diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) | |
download | gitlab-ce-6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde.tar.gz |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb')
-rw-r--r-- | db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb b/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb new file mode 100644 index 00000000000..ed970e30099 --- /dev/null +++ b/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class RemoveExistingWorkItemTypeBackfillMigrations < Gitlab::Database::Migration[2.0] + restrict_gitlab_migration gitlab_schema: :gitlab_main + + JOB_CLASS_NAME = 'BackfillWorkItemTypeIdForIssues' + + class BatchedMigration < MigrationRecord + self.table_name = 'batched_background_migrations' + end + + def up + # cleaning up so we can remove a custom batching strategy that is no longer necessary + # some environments might already have this background migrations scheduled and probably completed + BatchedMigration.where(job_class_name: JOB_CLASS_NAME).delete_all + end + + def down + # no-op + # we will reschedule this migration in the future, no need to add back here + end +end |