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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-30 03:09:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-30 03:09:36 +0300
commit0b54e3118075c2fc5f1f01b434b4694720597211 (patch)
tree9bbd415b8b99c54088533629f578550c6034a181 /db/migrate
parentb5eff9f970d14c07742d3bbc60344cd738d4a9d2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb b/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb
new file mode 100644
index 00000000000..e193a83e24a
--- /dev/null
+++ b/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class RemoveUniqueUrlIndicesFromZoektNodes < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME_INDEX_URL = 'index_zoekt_nodes_on_index_base_url'
+ INDEX_NAME_SEARCH_URL = 'index_zoekt_nodes_on_search_base_url'
+
+ def up
+ remove_concurrent_index :zoekt_nodes, :index_base_url, name: INDEX_NAME_INDEX_URL
+ remove_concurrent_index :zoekt_nodes, :search_base_url, name: INDEX_NAME_SEARCH_URL
+ end
+
+ def down
+ add_concurrent_index :zoekt_nodes, :index_base_url, unique: true, name: INDEX_NAME_INDEX_URL
+ add_concurrent_index :zoekt_nodes, :search_base_url, unique: true, name: INDEX_NAME_SEARCH_URL
+ end
+end