summaryrefslogtreecommitdiff
path: root/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-07-03 20:09:46 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-07-05 08:51:18 +0200
commit16d8251093b80ec544578481f20e0074b392d738 (patch)
treee9daeecec6b36dba5d807634ef138856f67194d9 /db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb
parentba9ef7f3935cfaa42fcdb2317567cc383c7e9c22 (diff)
downloadgitlab-ce-16d8251093b80ec544578481f20e0074b392d738.tar.gz
Add index on both Award Emoji user and nameindex-on-emoji-name-and-user
Diffstat (limited to 'db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb')
-rw-r--r--db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb11
1 files changed, 11 insertions, 0 deletions
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