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-12-28 00:16:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-28 00:16:17 +0300
commitd099cb5be9c4fa93ba9a114d11ba6dbe5f10a4eb (patch)
treed8de98401200c58a9f1b92bf1705fdae42f6d6d3 /db/post_migrate
parent034c9310c8f946cf82651e63f73bed0a599d345b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20231207211418_add_iid_namespace_unique_index_to_issues.rb17
-rw-r--r--db/post_migrate/20231207221418_drop_namespace_id_index_on_issues.rb17
2 files changed, 34 insertions, 0 deletions
diff --git a/db/post_migrate/20231207211418_add_iid_namespace_unique_index_to_issues.rb b/db/post_migrate/20231207211418_add_iid_namespace_unique_index_to_issues.rb
new file mode 100644
index 00000000000..4c2439f33ea
--- /dev/null
+++ b/db/post_migrate/20231207211418_add_iid_namespace_unique_index_to_issues.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIidNamespaceUniqueIndexToIssues < Gitlab::Database::Migration[2.2]
+ INDEX_NAME = 'index_issues_on_namespace_id_iid_unique'
+
+ disable_ddl_transaction!
+
+ milestone '16.8'
+
+ def up
+ add_concurrent_index :issues, [:namespace_id, :iid], name: INDEX_NAME, unique: true
+ end
+
+ def down
+ remove_concurrent_index_by_name :issues, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231207221418_drop_namespace_id_index_on_issues.rb b/db/post_migrate/20231207221418_drop_namespace_id_index_on_issues.rb
new file mode 100644
index 00000000000..38df861de00
--- /dev/null
+++ b/db/post_migrate/20231207221418_drop_namespace_id_index_on_issues.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DropNamespaceIdIndexOnIssues < Gitlab::Database::Migration[2.2]
+ INDEX_NAME = 'index_issues_on_namespace_id'
+
+ disable_ddl_transaction!
+
+ milestone '16.8'
+
+ def up
+ remove_concurrent_index_by_name :issues, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :issues, :namespace_id, name: INDEX_NAME
+ end
+end