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`.
This commit is contained in:
Timothy Andrew 2016-08-04 10:42:34 +05:30
parent 532202a527
commit 4d0461e299
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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