summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_recor...
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
downloadgitlab-ce-36a59d088eca61b834191dacea009677a96c052f.tar.gz
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb')
-rw-r--r--db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb b/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb
new file mode 100644
index 00000000000..3c1a6a48ef5
--- /dev/null
+++ b/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DeleteFailedResetDuplicateCiRunnersTokenMigrationRecords < Gitlab::Database::Migration[1.0]
+ def up
+ # Delete remaining records of botched migrations before we start the new migrations
+ Gitlab::Database::BackgroundMigrationJob
+ .for_migration_class('ResetDuplicateCiRunnersTokenValuesOnProjects')
+ .delete_all
+ Gitlab::Database::BackgroundMigrationJob
+ .for_migration_class('ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects')
+ .delete_all
+ end
+
+ def down
+ # no-op
+ end
+end