2020-03-06 06:28:26 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class InsertProjectSubscriptionsPlanLimits < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
2020-03-06 19:08:25 -05:00
|
|
|
return unless Gitlab.com?
|
2020-03-06 06:28:26 -05:00
|
|
|
|
2020-03-06 19:08:25 -05:00
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'free', 2)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'bronze', 2)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'silver', 2)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'gold', 2)
|
2020-03-06 06:28:26 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2020-03-06 19:08:25 -05:00
|
|
|
return unless Gitlab.com?
|
2020-03-06 06:28:26 -05:00
|
|
|
|
2020-03-06 19:08:25 -05:00
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'free', 0)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'bronze', 0)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'silver', 0)
|
|
|
|
create_or_update_plan_limit('ci_project_subscriptions', 'gold', 0)
|
2020-03-06 06:28:26 -05:00
|
|
|
end
|
|
|
|
end
|