Commit 44be5883 authored by Matija Čupić's avatar Matija Čupić

Use add_column_with_default in migration

parent 78ae2304
......@@ -7,9 +7,13 @@ class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def change
change_table :project_auto_devops do |t|
t.integer :deploy_strategy, null: false, default: 0
end
disable_ddl_transaction!
def up
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment