summaryrefslogtreecommitdiff
path: root/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20170424142900_add_index_to_web_hooks_type.rb')
-rw-r--r--db/migrate/20170424142900_add_index_to_web_hooks_type.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
new file mode 100644
index 00000000000..9af158e3844
--- /dev/null
+++ b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
@@ -0,0 +1,15 @@
+class AddIndexToWebHooksType < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :web_hooks, :type
+ end
+
+ def down
+ remove_concurrent_index :web_hooks, :type
+ end
+end