debian-mirror-gitlab/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb

21 lines
501 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# 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