summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-09 03:10:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-09 03:10:10 +0000
commit53f7c2edf478dac9e6b8e52c4b9a59c53659eb31 (patch)
tree095dd8a89f604956f5ff0ddf6e0b0cd0e0274a27 /db/migrate
parent6ec1ac0d653ff7436487e41019175d5413ee22c3 (diff)
downloadgitlab-ce-53f7c2edf478dac9e6b8e52c4b9a59c53659eb31.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210804202057_add_tmp_index_approval_project_rules_scanners.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20210804202057_add_tmp_index_approval_project_rules_scanners.rb b/db/migrate/20210804202057_add_tmp_index_approval_project_rules_scanners.rb
new file mode 100644
index 00000000000..66fcf485b2f
--- /dev/null
+++ b/db/migrate/20210804202057_add_tmp_index_approval_project_rules_scanners.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+# See https://docs.gitlab.com/ee/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddTmpIndexApprovalProjectRulesScanners < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ INDEX_NAME = 'tmp_index_approval_project_rules_scanners'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :approval_project_rules, :scanners, name: INDEX_NAME, using: :gin, where: "scanners @> '{cluster_image_scanning}'"
+ end
+
+ def down
+ remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME
+ end
+end