Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb')
-rw-r--r--db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb b/db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb
new file mode 100644
index 00000000000..a60141991a6
--- /dev/null
+++ b/db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveTmpIndexApprovalProjectRulesScanners < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'tmp_index_approval_project_rules_scanners'
+
+ def up
+ remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :approval_project_rules, :scanners, name: INDEX_NAME, using: :gin, where: "scanners @> '{cluster_image_scanning}'"
+ end
+end