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:
Diffstat (limited to 'db/post_migrate/20230924154419_drop_temporary_index_on_uuid_for_type_migration.rb')
-rw-r--r--db/post_migrate/20230924154419_drop_temporary_index_on_uuid_for_type_migration.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20230924154419_drop_temporary_index_on_uuid_for_type_migration.rb b/db/post_migrate/20230924154419_drop_temporary_index_on_uuid_for_type_migration.rb
new file mode 100644
index 00000000000..57bb176f39e
--- /dev/null
+++ b/db/post_migrate/20230924154419_drop_temporary_index_on_uuid_for_type_migration.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropTemporaryIndexOnUuidForTypeMigration < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = "tmp_idx_vulns_on_converted_uuid"
+
+ def up
+ remove_concurrent_index_by_name(
+ :vulnerability_occurrences,
+ INDEX_NAME
+ )
+ end
+
+ def down
+ # no-op, the table is too big so we need to create the index asynchronously
+ end
+end