Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
aecc4376
Commit
aecc4376
authored
Nov 05, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make migrations reversible
parent
4f574388
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
db/migrate/20151019111551_fix_build_tags.rb
db/migrate/20151019111551_fix_build_tags.rb
+5
-1
db/migrate/20151019111703_fail_build_without_names.rb
db/migrate/20151019111703_fail_build_without_names.rb
+4
-1
db/migrate/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 @
aecc4376
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 @
aecc4376
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 @
aecc4376
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