diff options
Diffstat (limited to 'db/post_migrate/20220715152108_backfill_project_import_level.rb')
-rw-r--r-- | db/post_migrate/20220715152108_backfill_project_import_level.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/db/post_migrate/20220715152108_backfill_project_import_level.rb b/db/post_migrate/20220715152108_backfill_project_import_level.rb new file mode 100644 index 00000000000..65a0dc0a58a --- /dev/null +++ b/db/post_migrate/20220715152108_backfill_project_import_level.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class BackfillProjectImportLevel < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + restrict_gitlab_migration gitlab_schema: :gitlab_main + + MIGRATION = 'BackfillProjectImportLevel' + INTERVAL = 120.seconds + + def up + queue_batched_background_migration( + MIGRATION, + :namespaces, + :id, + job_interval: INTERVAL + ) + end + + def down + delete_batched_background_migration(MIGRATION, :namespaces, :id, []) + end +end |