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
8ba27b7b
Commit
8ba27b7b
authored
Feb 20, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrations for convertion merge_status added
parent
ba1a453e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
20130220124204_add_new_merge_status_to_merge_request.rb
...e/20130220124204_add_new_merge_status_to_merge_request.rb
+5
-0
20130220125544_convert_merge_status_in_merge_request.rb
...e/20130220125544_convert_merge_status_in_merge_request.rb
+17
-0
20130220125545_remove_merge_status_from_merge_request.rb
.../20130220125545_remove_merge_status_from_merge_request.rb
+9
-0
20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb
...5_rename_new_merge_status_to_merge_status_in_milestone.rb
+5
-0
No files found.
db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb
0 → 100644
View file @
8ba27b7b
class
AddNewMergeStatusToMergeRequest
<
ActiveRecord
::
Migration
def
change
add_column
:merge_requests
,
:new_merge_status
,
:string
end
end
db/migrate/20130220125544_convert_merge_status_in_merge_request.rb
0 → 100644
View file @
8ba27b7b
class
ConvertMergeStatusInMergeRequest
<
ActiveRecord
::
Migration
def
up
MergeRequest
.
transaction
do
MergeRequest
.
where
(
merge_status:
1
).
update_all
(
"new_merge_status = 'unchecked'"
)
MergeRequest
.
where
(
merge_status:
2
).
update_all
(
"new_merge_status = 'can_be_merged'"
)
MergeRequest
.
where
(
merge_status:
3
).
update_all
(
"new_merge_status = 'cannot_be_merged'"
)
end
end
def
down
MergeRequest
.
transaction
do
MergeRequest
.
where
(
new_merge_status: :unchecked
).
update_all
(
"merge_status = 1"
)
MergeRequest
.
where
(
new_merge_status: :can_be_merged
).
update_all
(
"merge_status = 2"
)
MergeRequest
.
where
(
new_merge_status: :cannot_be_merged
).
update_all
(
"merge_status = 3"
)
end
end
end
db/migrate/20130220125545_remove_merge_status_from_merge_request.rb
0 → 100644
View file @
8ba27b7b
class
RemoveMergeStatusFromMergeRequest
<
ActiveRecord
::
Migration
def
up
remove_column
:merge_requests
,
:merge_status
end
def
down
add_column
:merge_requests
,
:merge_status
,
:integer
end
end
db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb
0 → 100644
View file @
8ba27b7b
class
RenameNewMergeStatusToMergeStatusInMilestone
<
ActiveRecord
::
Migration
def
change
rename_column
:merge_requests
,
:new_merge_status
,
:merge_status
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