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
44be5883
Commit
44be5883
authored
Jun 06, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use add_column_with_default in migration
parent
78ae2304
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
...80601213245_add_deploy_strategy_to_project_auto_devops.rb
+8
-4
No files found.
db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
View file @
44be5883
...
@@ -7,9 +7,13 @@ class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration
...
@@ -7,9 +7,13 @@ class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
DOWNTIME
=
false
def
change
disable_ddl_transaction!
change_table
:project_auto_devops
do
|
t
|
t
.
integer
:deploy_strategy
,
null:
false
,
default:
0
def
up
end
add_column_with_default
:project_auto_devops
,
:deploy_strategy
,
:integer
,
default:
0
,
allow_null:
false
end
def
down
remove_column
:project_auto_devops
,
:deploy_strategy
end
end
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