Commit dda83994 authored by Adam Hegyi's avatar Adam Hegyi

Verify check constraint existence before removing

This change fixes the `has_external_wiki` not null check constraint
rollback by checking if the constraint exists before removing it.
parent caa86179
......@@ -9,8 +9,10 @@ class RemoveHasExternalWikiConstraint < ActiveRecord::Migration[6.0]
def up
# This reverts the following migration: add_not_null_constraint :projects, :has_external_wiki, validate: false
if check_not_null_constraint_exists?(:projects, :has_external_wiki)
remove_not_null_constraint :projects, :has_external_wiki
end
end
def down
# no-op
......
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