diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-07-05 10:22:39 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-07-06 12:53:31 -0400 |
commit | 3dee2366bf32413486a116247f04ca7c7aca1430 (patch) | |
tree | 220bd02c078fd729866179499a685d31dfffece0 | |
parent | e0733819b1c4d75e664582fc09c1b67feaa076ff (diff) | |
download | gitlab-ce-3dee2366bf32413486a116247f04ca7c7aca1430.tar.gz |
Merge branch 'index-on-emoji-name-and-user' into 'master'
Add index on both Award Emoji user and name
See merge request !5061
(cherry picked from commit c85092ac47dfd0bd3f6585c574f5bfdc1a50515b)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index c20f1247064..2056b5e7b36 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.9.5 + - Add index on both Award Emoji user and name. !5061 - Downgrade to Redis 3.2.2 due to massive memory leak with Sidekiq. !5056 - Re-enable import button when import process fails due to namespace already being taken. !5053 - Fix snippets comments not displayed. !5045 diff --git a/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb new file mode 100644 index 00000000000..0c25f87dfb4 --- /dev/null +++ b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb @@ -0,0 +1,11 @@ +# rubocop:disable all +# Migration type: online without errors + +class AddIndexOnAwardEmojiUserAndName < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def change + add_concurrent_index(:award_emoji, [:user_id, :name]) + end +end diff --git a/db/schema.rb b/db/schema.rb index 7a8377f687c..cc78d03ab1d 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: 20160620115026) do +ActiveRecord::Schema.define(version: 20160703180340) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -111,6 +111,7 @@ ActiveRecord::Schema.define(version: 20160620115026) do end add_index "award_emoji", ["awardable_type", "awardable_id"], name: "index_award_emoji_on_awardable_type_and_awardable_id", using: :btree + add_index "award_emoji", ["user_id", "name"], name: "index_award_emoji_on_user_id_and_name", using: :btree add_index "award_emoji", ["user_id"], name: "index_award_emoji_on_user_id", using: :btree create_table "broadcast_messages", force: :cascade do |t| |