BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7bc24ec2
Commit
7bc24ec2
authored
May 03, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract constants in 20180430143705_backfill_runner_type_for_ci_runners_post_migrate
parent
dc439a3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
...43705_backfill_runner_type_for_ci_runners_post_migrate.rb
+5
-2
No files found.
db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
View file @
7bc24ec2
...
...
@@ -3,14 +3,17 @@ class BackfillRunnerTypeForCiRunnersPostMigrate < ActiveRecord::Migration
DOWNTIME
=
false
PROJECT_RUNNER_TYPE
=
1
INSTANCE_RUNNER_TYPE
=
3
disable_ddl_transaction!
def
up
update_column_in_batches
(
:ci_runners
,
:runner_type
,
1
)
do
|
table
,
query
|
update_column_in_batches
(
:ci_runners
,
:runner_type
,
PROJECT_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
,
3
)
do
|
table
,
query
|
update_column_in_batches
(
:ci_runners
,
:runner_type
,
INSTANCE_RUNNER_TYPE
)
do
|
table
,
query
|
query
.
where
(
table
[
:is_shared
].
eq
(
false
)).
where
(
table
[
:runner_type
].
eq
(
nil
))
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment