diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-09 03:10:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-09 03:10:10 +0000 |
commit | 53f7c2edf478dac9e6b8e52c4b9a59c53659eb31 (patch) | |
tree | 095dd8a89f604956f5ff0ddf6e0b0cd0e0274a27 /db/migrate | |
parent | 6ec1ac0d653ff7436487e41019175d5413ee22c3 (diff) | |
download | gitlab-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.rb | 20 |
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 |