summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-25 21:10:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-25 21:10:28 +0000
commit52f765baf4931efd40d10b1eb5f2818923ddf26f (patch)
tree5cdbe4c6aa08be4b829316b0d80f94d46c305703 /db
parentb98791fe502a4dfc02b70d3fa4b4140afb69d7d9 (diff)
downloadgitlab-ce-52f765baf4931efd40d10b1eb5f2818923ddf26f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210819152723_remove_tmp_index_approval_project_rules_scanners.rb17
-rw-r--r--db/schema_migrations/202108191527231
-rw-r--r--db/structure.sql2
3 files changed, 18 insertions, 2 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
diff --git a/db/schema_migrations/20210819152723 b/db/schema_migrations/20210819152723
new file mode 100644
index 00000000000..b5f4d2795f7
--- /dev/null
+++ b/db/schema_migrations/20210819152723
@@ -0,0 +1 @@
+b311fdb0a6e0e10ca3c67b9b2c3d920f8e735f0fd8398fdaa25853e14f88ae97 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 5ebfa6e4d2b..09cef971f04 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -25903,8 +25903,6 @@ CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occu
CREATE INDEX tmp_idx_on_namespaces_delayed_project_removal ON namespaces USING btree (id) WHERE (delayed_project_removal = true);
-CREATE INDEX tmp_index_approval_project_rules_scanners ON approval_project_rules USING gin (scanners) WHERE (scanners @> '{cluster_image_scanning}'::text[]);
-
CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_child_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NOT NULL) AND (traversal_ids = '{}'::integer[]));
CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[]));