summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-05-18 11:10:42 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-05-18 12:47:11 +0000
commit69e4b27c31c90d0835acf1bbd1c1497bb51abaea (patch)
tree3fbf0c5865215f666d91c4edaaab6e4f62cb46c4
parentdb0d52be11f0956d74ee64d461718871963451c6 (diff)
downloadgitlab-ce-69e4b27c31c90d0835acf1bbd1c1497bb51abaea.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