diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-18 11:21:01 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-18 11:21:01 +0300 |
commit | 2950564ae62c7b7fe52fbccc3c6a87dc5d9480fa (patch) | |
tree | e22f86276bf4b5423010ae2d1621aeafe7eee678 /db/post_migrate | |
parent | a49337727be1e28c29ad19b310fa2eb2df828c91 (diff) |
Adding NULL:false constraint with change_column_null instead of change_column
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb index 2aab1f4d14f..6fa573c5b49 100644 --- a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb +++ b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb @@ -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 |