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
b8c39649
Commit
b8c39649
authored
May 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add stage_id column to ci_builds in a separate migration
parent
56681cf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
20170526185602_add_stage_id_to_ci_builds.rb
db/migrate/20170526185602_add_stage_id_to_ci_builds.rb
+9
-0
20170526101042_migrate_pipeline_stages.rb
db/post_migrate/20170526101042_migrate_pipeline_stages.rb
+0
-2
No files found.
db/migrate/20170526185602_add_stage_id_to_ci_builds.rb
0 → 100644
View file @
b8c39649
class
AddStageIdToCiBuilds
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
add_column
:ci_builds
,
:stage_id
,
:integer
end
end
db/post_migrate/20170526101042_migrate_pipeline_stages.rb
View file @
b8c39649
...
...
@@ -16,8 +16,6 @@ class MigratePipelineStages < ActiveRecord::Migration
ORDER BY stage_idx
SQL
add_column
(
:ci_builds
,
:stage_id
,
:integer
)
stage_id
=
Arel
.
sql
(
'(SELECT id FROM ci_stages '
\
'WHERE ci_stages.pipeline_id = ci_builds.commit_id '
\
'AND ci_stages.name = ci_builds.stage)'
)
...
...
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