blob: ed970e300993ab6309547c85c0703e1bd01d13d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
|