diff options
Diffstat (limited to 'db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb')
-rw-r--r-- | db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb b/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb new file mode 100644 index 00000000000..2c772a79327 --- /dev/null +++ b/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class QueueBackfillProjectFeaturePackageRegistryAccessLevel < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + MIGRATION = 'BackfillProjectFeaturePackageRegistryAccessLevel' + DELAY_INTERVAL = 2.minutes + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + queue_batched_background_migration( + MIGRATION, + :projects, + :id, + job_interval: DELAY_INTERVAL + ) + end + + def down + delete_batched_background_migration(MIGRATION, :projects, :id, []) + end +end |