summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-03 18:08:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-03 18:08:43 +0000
commit03717bbc9fa4112a0cbc48f613f416f2aa1c6cbb (patch)
treea7b2d1c4175d725538e0b72e6f5aec33dc9b3d4d /db/post_migrate
parent27a5080c34c64a84219d855d652b994c5e344a0a (diff)
downloadgitlab-ce-03717bbc9fa4112a0cbc48f613f416f2aa1c6cbb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20230503032750_remove_redundant_index_from_container_repositories.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20230503032750_remove_redundant_index_from_container_repositories.rb b/db/post_migrate/20230503032750_remove_redundant_index_from_container_repositories.rb
new file mode 100644
index 00000000000..a538dc054bb
--- /dev/null
+++ b/db/post_migrate/20230503032750_remove_redundant_index_from_container_repositories.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RemoveRedundantIndexFromContainerRepositories < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_container_repositories_on_project_id'
+
+ def up
+ remove_concurrent_index_by_name :container_repositories, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :container_repositories, :project_id, name: INDEX_NAME
+ end
+end