Merge branch 'ab-44467-remove-index' into 'master'
Remove unused index from events table. Closes #44467 See merge request gitlab-org/gitlab-ce!18014
This commit is contained in:
commit
fbb727db3e
3 changed files with 24 additions and 2 deletions
5
changelogs/unreleased/ab-44467-remove-index.yml
Normal file
5
changelogs/unreleased/ab-44467-remove-index.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove unused index from events table.
|
||||
merge_request: 18014
|
||||
author:
|
||||
type: other
|
18
db/migrate/20180327101207_remove_index_from_events_table.rb
Normal file
18
db/migrate/20180327101207_remove_index_from_events_table.rb
Normal file
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue