diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-03 18:02:38 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-03 18:02:38 +0200 |
commit | ed9b285b0e1bbbfe88f685cdebd22227f37b97b9 (patch) | |
tree | 59c380ba7e0d44d71e3f159cc7155043eb8226f0 /db | |
parent | cb49d68c4fe565cc4fdc3a326c45e3ded548cd24 (diff) | |
download | gitlab-ce-ed9b285b0e1bbbfe88f685cdebd22227f37b97b9.tar.gz |
Fix constants in backfill_runner_type_for_ci_runners_post_migrate.rb
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb b/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb index 9186a729a40..38af5aae924 100644 --- a/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb +++ b/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb @@ -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 |