Merge branch 'fix_set_null_false_migration' into 'master'
Adding NULL:false constraint with change_column_null instead of change_column Closes #32450 See merge request !11471
This commit is contained in:
commit
9e34c8dc1c
1 changed files with 4 additions and 4 deletions
|
@ -26,12 +26,12 @@ class AddConstraintsToIssueAssigneesTable < ActiveRecord::Migration
|
|||
# disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
change_column :issue_assignees, :issue_id, :integer, null: false
|
||||
change_column :issue_assignees, :user_id, :integer, null: false
|
||||
change_column_null :issue_assignees, :issue_id, false
|
||||
change_column_null :issue_assignees, :user_id, false
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :issue_assignees, :issue_id, :integer
|
||||
change_column :issue_assignees, :user_id, :integer
|
||||
change_column_null :issue_assignees, :issue_id, true
|
||||
change_column_null :issue_assignees, :user_id, true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue