diff options
Diffstat (limited to 'db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb')
-rw-r--r-- | db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb b/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb new file mode 100644 index 00000000000..b9980f65c98 --- /dev/null +++ b/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class InsertDastProfileSchedulesPlanLimits < Gitlab::Database::Migration[1.0] + def up + create_or_update_plan_limit('dast_profile_schedules', 'default', 0) + create_or_update_plan_limit('dast_profile_schedules', 'free', 1) + create_or_update_plan_limit('dast_profile_schedules', 'bronze', 1) + create_or_update_plan_limit('dast_profile_schedules', 'silver', 1) + create_or_update_plan_limit('dast_profile_schedules', 'premium', 1) + create_or_update_plan_limit('dast_profile_schedules', 'premium_trial', 1) + create_or_update_plan_limit('dast_profile_schedules', 'gold', 20) + create_or_update_plan_limit('dast_profile_schedules', 'ultimate', 20) + create_or_update_plan_limit('dast_profile_schedules', 'ultimate_trial', 20) + end + + def down + create_or_update_plan_limit('dast_profile_schedules', 'default', 0) + create_or_update_plan_limit('dast_profile_schedules', 'free', 0) + create_or_update_plan_limit('dast_profile_schedules', 'bronze', 0) + create_or_update_plan_limit('dast_profile_schedules', 'silver', 0) + create_or_update_plan_limit('dast_profile_schedules', 'premium', 0) + create_or_update_plan_limit('dast_profile_schedules', 'premium_trial', 0) + create_or_update_plan_limit('dast_profile_schedules', 'gold', 0) + create_or_update_plan_limit('dast_profile_schedules', 'ultimate', 0) + create_or_update_plan_limit('dast_profile_schedules', 'ultimate_trial', 0) + end +end |