diff options
author | Reuben Pereira <rpereira@gitlab.com> | 2019-01-07 17:55:21 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-01-07 17:55:21 +0000 |
commit | f40b5860d76a8ea5d964260834a6e83516b0f1fd (patch) | |
tree | 2a8e92896130697178f5c989e49fa686f66ce073 /db | |
parent | 549ee8ada3b59278871a89720632584bc5cc11df (diff) | |
download | gitlab-ce-f40b5860d76a8ea5d964260834a6e83516b0f1fd.tar.gz |
Add table and model for error tracking settings
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20181212171634_create_error_tracking_settings.rb | 17 | ||||
-rw-r--r-- | db/schema.rb | 8 |
2 files changed, 25 insertions, 0 deletions
diff --git a/db/migrate/20181212171634_create_error_tracking_settings.rb b/db/migrate/20181212171634_create_error_tracking_settings.rb new file mode 100644 index 00000000000..18c38bd2c47 --- /dev/null +++ b/db/migrate/20181212171634_create_error_tracking_settings.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class CreateErrorTrackingSettings < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :project_error_tracking_settings, id: :int, primary_key: :project_id, default: nil do |t| + t.boolean :enabled, null: false, default: true + t.string :api_url, null: false + t.string :encrypted_token + t.string :encrypted_token_iv + t.foreign_key :projects, column: :project_id, on_delete: :cascade + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 12e4ed6d627..87826881d58 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1573,6 +1573,13 @@ ActiveRecord::Schema.define(version: 20190103140724) do t.index ["project_id", "deploy_token_id"], name: "index_project_deploy_tokens_on_project_id_and_deploy_token_id", unique: true, using: :btree end + create_table "project_error_tracking_settings", primary_key: "project_id", id: :integer, force: :cascade do |t| + t.boolean "enabled", default: true, null: false + t.string "api_url", null: false + t.string "encrypted_token" + t.string "encrypted_token_iv" + end + create_table "project_features", force: :cascade do |t| t.integer "project_id", null: false t.integer "merge_requests_access_level" @@ -2434,6 +2441,7 @@ ActiveRecord::Schema.define(version: 20190103140724) do add_foreign_key "project_custom_attributes", "projects", on_delete: :cascade add_foreign_key "project_deploy_tokens", "deploy_tokens", on_delete: :cascade add_foreign_key "project_deploy_tokens", "projects", on_delete: :cascade + add_foreign_key "project_error_tracking_settings", "projects", on_delete: :cascade add_foreign_key "project_features", "projects", name: "fk_18513d9b92", on_delete: :cascade add_foreign_key "project_group_links", "projects", name: "fk_daa8cee94c", on_delete: :cascade add_foreign_key "project_import_data", "projects", name: "fk_ffb9ee3a10", on_delete: :cascade |