diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb | 17 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb b/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb new file mode 100644 index 00000000000..05b9e6d5958 --- /dev/null +++ b/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexToSentryIssuesSentryIssueIdentifier < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :sentry_issues, :sentry_issue_identifier + end + + def down + remove_concurrent_index :sentry_issues, :sentry_issue_identifier + end +end diff --git a/db/schema.rb b/db/schema.rb index 956c7a30970..2c00254cd04 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_01_14_113341) do +ActiveRecord::Schema.define(version: 2020_01_14_204949) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" @@ -3732,6 +3732,7 @@ ActiveRecord::Schema.define(version: 2020_01_14_113341) do t.bigint "issue_id", null: false t.bigint "sentry_issue_identifier", null: false t.index ["issue_id"], name: "index_sentry_issues_on_issue_id", unique: true + t.index ["sentry_issue_identifier"], name: "index_sentry_issues_on_sentry_issue_identifier" end create_table "serverless_domain_cluster", primary_key: "uuid", id: :string, limit: 14, force: :cascade do |t| |