diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-04 15:48:52 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-08-04 15:48:52 +0000 |
commit | bd156bb8fcc8210b1f727bb608cf781870950947 (patch) | |
tree | 184554f82caa128f6919f2e11d96ca3c71382049 | |
parent | 4e457100cffe4128523c32ca073c8353fd9fa3d1 (diff) | |
parent | 4d0461e29983630a653203a1e5c1a28dfcfeada5 (diff) | |
download | gitlab-ce-bd156bb8fcc8210b1f727bb608cf781870950947.tar.gz |
Merge branch 'fix-add-column-with-default-null' into 'master'
Fix `#down` for two protected branches-related migrations.
- The migrations called `add_column_with_default` with a `null` option, which the Rails `add_column` method accepts. This fails because `add_column_with_default` expects an `allow_null` option instead.
- The migrations have been fixed to use `allow_null`.
See merge request !5660
-rw-r--r-- | db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb | 2 | ||||
-rw-r--r-- | db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb index f563f660ddf..52a9819c628 100644 --- a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb +++ b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb @@ -14,6 +14,6 @@ class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration end def down - add_column_with_default(:protected_branches, :developers_can_push, :boolean, default: false, null: false) + add_column_with_default(:protected_branches, :developers_can_push, :boolean, default: false, allow_null: false) end end diff --git a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb index aa71e06d36e..4a7bde7f9f3 100644 --- a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb +++ b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb @@ -14,6 +14,6 @@ class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration end def down - add_column_with_default(:protected_branches, :developers_can_merge, :boolean, default: false, null: false) + add_column_with_default(:protected_branches, :developers_can_merge, :boolean, default: false, allow_null: false) end end |