Commit bd156bb8 authored by Douwe Maan's avatar Douwe Maan

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
parents 4e457100 4d0461e2
...@@ -14,6 +14,6 @@ class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration ...@@ -14,6 +14,6 @@ class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration
end end
def down 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
end end
...@@ -14,6 +14,6 @@ class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration ...@@ -14,6 +14,6 @@ class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration
end end
def down 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
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment