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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:11:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:11:37 +0300
commitc62dd5ae440db9ad4696000a863fbcb53fe83498 (patch)
tree3e4c18cd7a475e6d81f80335d173f1eb3f9510d8 /db
parentaa88b9053d72f3f9b69ae5365b77595dcae5c0c3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb21
-rw-r--r--db/schema_migrations/202301300847181
2 files changed, 22 insertions, 0 deletions
diff --git a/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb b/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb
new file mode 100644
index 00000000000..ebe28eb4088
--- /dev/null
+++ b/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class DropInvalidAsyncIndexFromPostgresAsyncIndex < Gitlab::Database::Migration[2.1]
+ # rollback 20230117092947_add_tmp_index_to_ci_build_report_results.rb
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'tmp_index_ci_build_report_results_on_partition_id_and_id'
+ TABLE_NAME = 'ci_build_report_results'
+
+ def up
+ return unless Gitlab.com?
+
+ unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ def down
+ return unless Gitlab.com?
+
+ prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20230130084718 b/db/schema_migrations/20230130084718
new file mode 100644
index 00000000000..8ba8cf04105
--- /dev/null
+++ b/db/schema_migrations/20230130084718
@@ -0,0 +1 @@
+90e2078790aed27af30756977d40a9ae839ddadcf336c0d1d4da4ab56a26d7ec \ No newline at end of file