BigW Consortium Gitlab

Commit 2950564a by Valery Sizov

Adding NULL:false constraint with change_column_null instead of change_column

parent a4933772
......@@ -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
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