2020-01-01 13:55:28 +05:30
|
|
|
# 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-03-13 15:44:24 +05:30
|
|
|
# rubocop:disable Migration/AddColumnWithDefault
|
2020-01-01 13:55:28 +05:30
|
|
|
add_column_with_default :pages_domains, :wildcard, :boolean, default: false
|
|
|
|
add_column_with_default :pages_domains, :domain_type, :integer, limit: 2, default: PROJECT_TYPE
|
2020-03-13 15:44:24 +05:30
|
|
|
# rubocop:enable Migration/AddColumnWithDefault
|
2020-01-01 13:55:28 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :pages_domains, :wildcard
|
|
|
|
remove_column :pages_domains, :domain_type
|
|
|
|
end
|
|
|
|
end
|