summaryrefslogtreecommitdiff
path: root/db/migrate/20190107151020_add_services_type_index.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-09 11:33:49 +0100
committerNick Thomas <nick@gitlab.com>2019-02-08 18:20:38 +0000
commita5378665a1dc0b9c8dc3a4fa279a0eb78aac5aac (patch)
tree043e997f3f65d535c6fa0cbb8069aec90b7f440f /db/migrate/20190107151020_add_services_type_index.rb
parent2d70977aced471c4e602fb9cd3257c93d645f152 (diff)
downloadgitlab-ce-a5378665a1dc0b9c8dc3a4fa279a0eb78aac5aac.tar.gz
Remove HipChat integration from GitLab
Diffstat (limited to 'db/migrate/20190107151020_add_services_type_index.rb')
-rw-r--r--db/migrate/20190107151020_add_services_type_index.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20190107151020_add_services_type_index.rb b/db/migrate/20190107151020_add_services_type_index.rb
new file mode 100644
index 00000000000..26b5bd58750
--- /dev/null
+++ b/db/migrate/20190107151020_add_services_type_index.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddServicesTypeIndex < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :services, :type unless index_exists?(:services, :type)
+ end
+
+ def down
+ remove_concurrent_index :services, :type if index_exists?(:services, :type)
+ end
+end