debian-mirror-gitlab/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb
2023-06-20 00:43:36 +05:30

18 lines
513 B
Ruby

# frozen_string_literal: true
class SetMaxRunningBatchedBackgroundMigrationsForGitlabCom < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
return unless Gitlab.com? && !Gitlab.jh?
execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 4'
end
def down
return unless Gitlab.com? && !Gitlab.jh?
execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 2'
end
end