debian-mirror-gitlab/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb
2021-03-11 19:13:27 +05:30

20 lines
501 B
Ruby

# frozen_string_literal: true
class RemoveHasExternalWikiConstraint < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
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
end
end