2019-04-08 14:50:28 -04:00
|
|
|
class AddDefaultProjectCreationSetting < ActiveRecord::Migration[4.2]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2019-04-08 18:10:21 -04:00
|
|
|
unless column_exists?(:application_settings, :default_project_creation)
|
|
|
|
add_column_with_default(:application_settings, :default_project_creation, :integer, default: 2)
|
|
|
|
end
|
2019-04-08 14:50:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2019-04-08 18:10:21 -04:00
|
|
|
if column_exists?(:application_settings, :default_project_creation)
|
|
|
|
remove_column(:application_settings, :default_project_creation)
|
|
|
|
end
|
2019-04-08 14:50:28 -04:00
|
|
|
end
|
|
|
|
end
|