Fix constants in backfill_runner_type_for_ci_runners_post_migrate.rb
This commit is contained in:
parent
cb49d68c4f
commit
ed9b285b0e
1 changed files with 4 additions and 4 deletions
|
@ -3,17 +3,17 @@ class BackfillRunnerTypeForCiRunnersPostMigrate < ActiveRecord::Migration
|
|||
|
||||
DOWNTIME = false
|
||||
|
||||
PROJECT_RUNNER_TYPE = 1
|
||||
INSTANCE_RUNNER_TYPE = 3
|
||||
INSTANCE_RUNNER_TYPE = 1
|
||||
PROJECT_RUNNER_TYPE = 3
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
update_column_in_batches(:ci_runners, :runner_type, PROJECT_RUNNER_TYPE) do |table, query|
|
||||
update_column_in_batches(:ci_runners, :runner_type, INSTANCE_RUNNER_TYPE) do |table, query|
|
||||
query.where(table[:is_shared].eq(true)).where(table[:runner_type].eq(nil))
|
||||
end
|
||||
|
||||
update_column_in_batches(:ci_runners, :runner_type, INSTANCE_RUNNER_TYPE) do |table, query|
|
||||
update_column_in_batches(:ci_runners, :runner_type, PROJECT_RUNNER_TYPE) do |table, query|
|
||||
query.where(table[:is_shared].eq(false)).where(table[:runner_type].eq(nil))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue