diff options
Diffstat (limited to 'db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb')
-rw-r--r-- | db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb b/db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb new file mode 100644 index 00000000000..6893a02bcad --- /dev/null +++ b/db/migrate/20191127221608_add_wildcard_and_domain_type_to_pages_domains.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddWildcardAndDomainTypeToPagesDomains < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + PROJECT_TYPE = 2 + + disable_ddl_transaction! + + def up + add_column_with_default :pages_domains, :wildcard, :boolean, default: false + add_column_with_default :pages_domains, :domain_type, :integer, limit: 2, default: PROJECT_TYPE + end + + def down + remove_column :pages_domains, :wildcard + remove_column :pages_domains, :domain_type + end +end |