summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-29 03:07:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-29 03:07:49 +0000
commitc201d59a4f031bb198e9541c57b4fd026388f5be (patch)
treee72ebd433756b4d0f3668f8234f4525e07b04f63 /db
parent0914eb1a9ca655784302e3a21635d58c7e7af7c2 (diff)
downloadgitlab-ce-c201d59a4f031bb198e9541c57b4fd026388f5be.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb16
-rw-r--r--db/schema_migrations/202209201221211
2 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb b/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb
new file mode 100644
index 00000000000..57475a08c93
--- /dev/null
+++ b/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class ScheduleIndexRemovalForCiBuildsMetadata < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_builds_metadata
+ INDEX_NAME = :index_ci_builds_metadata_on_build_id
+
+ def up
+ prepare_async_index_removal(TABLE_NAME, :build_id, name: INDEX_NAME)
+ end
+
+ def down
+ unprepare_async_index(TABLE_NAME, :build_id, name: INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20220920122121 b/db/schema_migrations/20220920122121
new file mode 100644
index 00000000000..7da41e83a11
--- /dev/null
+++ b/db/schema_migrations/20220920122121
@@ -0,0 +1 @@
+fb6b88494168ef86863f41570a2bad1141d6c6e2305522bf622413702e3b3493 \ No newline at end of file