summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-08-04 10:42:34 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-08-04 10:42:34 +0530
commit4d0461e29983630a653203a1e5c1a28dfcfeada5 (patch)
tree425a0fcc1c2fb1478e5eec2d1d3e68cc3c232fc0
parent532202a5278a622de874b9dfc1c4f7fe9ddf5ce4 (diff)
downloadgitlab-ce-fix-add-column-with-default-null.tar.gz
Fix `#down` for two protected branches-related migrations.fix-add-column-with-default-null
- 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`.
-rw-r--r--db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb2
-rw-r--r--db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb2
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