2019-12-14 15:07:56 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddWildcardAndDomainTypeToPagesDomains < ActiveRecord::Migration[5.2]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
PROJECT_TYPE = 2
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2020-05-15 15:08:04 +00:00
|
|
|
add_column_with_default :pages_domains, :wildcard, :boolean, default: false # rubocop:disable Migration/AddColumnWithDefault
|
|
|
|
add_column_with_default :pages_domains, :domain_type, :integer, limit: 2, default: PROJECT_TYPE # rubocop:disable Migration/AddColumnWithDefault
|
2019-12-14 15:07:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :pages_domains, :wildcard
|
|
|
|
remove_column :pages_domains, :domain_type
|
|
|
|
end
|
|
|
|
end
|