summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-05-18 11:10:42 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2017-05-18 11:10:42 +0000
commit9e34c8dc1c97b3dc26f5938189813bf676f3ed7f (patch)
tree562f2500be580c67e2bcd6557b583e69db053c24
parenta67bb1f0ede51acab88dc3a11928a6d07bd189e7 (diff)
parent2950564ae62c7b7fe52fbccc3c6a87dc5d9480fa (diff)
downloadgitlab-ce-9e34c8dc1c97b3dc26f5938189813bf676f3ed7f.tar.gz
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
-rw-r--r--db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb8
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