diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-03-27 12:14:03 +0200 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-03-27 12:17:56 +0200 |
commit | f208411bff713993ba37bf199f3b5495ed32cb3a (patch) | |
tree | 13d584a47164f6e0a8d8301517b7f07f7a9e5067 /db | |
parent | 01c4f56546b9fc12da7333a8d367da22c1c42c46 (diff) | |
download | gitlab-ce-f208411bff713993ba37bf199f3b5495ed32cb3a.tar.gz |
Remove unused index from events table.
Closes #44467.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180327101207_remove_index_from_events_table.rb | 18 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/db/migrate/20180327101207_remove_index_from_events_table.rb b/db/migrate/20180327101207_remove_index_from_events_table.rb new file mode 100644 index 00000000000..172441da65b --- /dev/null +++ b/db/migrate/20180327101207_remove_index_from_events_table.rb @@ -0,0 +1,18 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class RemoveIndexFromEventsTable < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + remove_concurrent_index :events, :author_id + end + + def down + add_concurrent_index :events, :author_id + end +end diff --git a/db/schema.rb b/db/schema.rb index b3b2d5b0da9..3bf42080870 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180323150945) do +ActiveRecord::Schema.define(version: 20180327101207) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -732,7 +732,6 @@ ActiveRecord::Schema.define(version: 20180323150945) do add_index "events", ["action"], name: "index_events_on_action", using: :btree add_index "events", ["author_id", "project_id"], name: "index_events_on_author_id_and_project_id", using: :btree - add_index "events", ["author_id"], name: "index_events_on_author_id", using: :btree add_index "events", ["project_id", "id"], name: "index_events_on_project_id_and_id", using: :btree add_index "events", ["target_type", "target_id"], name: "index_events_on_target_type_and_target_id", using: :btree |