summaryrefslogtreecommitdiff
path: root/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20170210103609_add_index_to_user_agent_detail.rb')
-rw-r--r--db/migrate/20170210103609_add_index_to_user_agent_detail.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
new file mode 100644
index 00000000000..c01753cfbd2
--- /dev/null
+++ b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
@@ -0,0 +1,14 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddIndexToUserAgentDetail < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def change
+ add_concurrent_index(:user_agent_details, [:subject_id, :subject_type])
+ end
+end