blob: 768e0c7826fe9e3629b57c4cbfebfd7875dd79df (
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 QueuePopulateProjectsStarCount < Gitlab::Database::Migration[2.0]
MIGRATION = 'PopulateProjectsStarCount'
DELAY_INTERVAL = 2.minutes
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
queue_batched_background_migration(
MIGRATION,
:projects,
:id,
job_interval: DELAY_INTERVAL,
sub_batch_size: 50
)
end
def down
delete_batched_background_migration(MIGRATION, :projects, :id, [])
end
end
|