2021-02-03 00:09:41 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-02-03 12:09:12 +00:00
|
|
|
class RemoveHasExternalWikiConstraint < ActiveRecord::Migration[6.0]
|
2021-02-03 00:09:41 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
2021-02-03 12:09:12 +00:00
|
|
|
|
2021-02-03 00:09:41 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2021-02-03 12:09:12 +00:00
|
|
|
# This reverts the following migration: add_not_null_constraint :projects, :has_external_wiki, validate: false
|
2021-02-03 21:09:17 +00:00
|
|
|
if check_not_null_constraint_exists?(:projects, :has_external_wiki)
|
|
|
|
remove_not_null_constraint :projects, :has_external_wiki
|
|
|
|
end
|
2021-02-03 00:09:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2021-02-03 12:09:12 +00:00
|
|
|
# no-op
|
2021-02-03 00:09:41 +00:00
|
|
|
end
|
|
|
|
end
|