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
1423284c
Commit
1423284c
authored
Nov 05, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'reversible_migration' into 'master'
Make migrations reversible See merge request !1753
parents
ccf5e2d6
aecc4376
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
20151019111551_fix_build_tags.rb
db/migrate/20151019111551_fix_build_tags.rb
+5
-1
20151019111703_fail_build_without_names.rb
db/migrate/20151019111703_fail_build_without_names.rb
+4
-1
20151023112551_fail_build_with_empty_name.rb
db/migrate/20151023112551_fail_build_with_empty_name.rb
+4
-1
No files found.
db/migrate/20151019111551_fix_build_tags.rb
View file @
1423284c
class
FixBuildTags
<
ActiveRecord
::
Migration
def
change
def
up
execute
(
"UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'"
)
end
def
down
execute
(
"UPDATE taggings SET taggable_type='Ci::Build' WHERE taggable_type='CommitStatus'"
)
end
end
db/migrate/20151019111703_fail_build_without_names.rb
View file @
1423284c
class
FailBuildWithoutNames
<
ActiveRecord
::
Migration
def
change
def
up
execute
(
"UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'"
)
end
def
down
end
end
db/migrate/20151023112551_fail_build_with_empty_name.rb
View file @
1423284c
class
FailBuildWithEmptyName
<
ActiveRecord
::
Migration
def
change
def
up
execute
(
"UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'"
)
end
def
down
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