diff options
Diffstat (limited to 'db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb')
-rw-r--r-- | db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb b/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb new file mode 100644 index 00000000000..d1ad5be5f85 --- /dev/null +++ b/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class InsertCiPipelineSchedulesPlanLimits < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + return unless Gitlab.com? + + create_or_update_plan_limit('ci_pipeline_schedules', 'free', 10) + create_or_update_plan_limit('ci_pipeline_schedules', 'bronze', 50) + create_or_update_plan_limit('ci_pipeline_schedules', 'silver', 50) + create_or_update_plan_limit('ci_pipeline_schedules', 'gold', 50) + end + + def down + return unless Gitlab.com? + + create_or_update_plan_limit('ci_pipeline_schedules', 'free', 0) + create_or_update_plan_limit('ci_pipeline_schedules', 'bronze', 0) + create_or_update_plan_limit('ci_pipeline_schedules', 'silver', 0) + create_or_update_plan_limit('ci_pipeline_schedules', 'gold', 0) + end +end |