From 4d0461e29983630a653203a1e5c1a28dfcfeada5 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Thu, 4 Aug 2016 10:42:34 +0530 Subject: [PATCH] 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`. --- ...055809_remove_developers_can_push_from_protected_branches.rb | 2 +- ...55813_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