diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /db/migrate/20210423164702_insert_runner_registration_plan_limits.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'db/migrate/20210423164702_insert_runner_registration_plan_limits.rb')
-rw-r--r-- | db/migrate/20210423164702_insert_runner_registration_plan_limits.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20210423164702_insert_runner_registration_plan_limits.rb b/db/migrate/20210423164702_insert_runner_registration_plan_limits.rb new file mode 100644 index 00000000000..36d13dfa120 --- /dev/null +++ b/db/migrate/20210423164702_insert_runner_registration_plan_limits.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class InsertRunnerRegistrationPlanLimits < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + def up + create_or_update_plan_limit('ci_registered_group_runners', 'free', 50) + create_or_update_plan_limit('ci_registered_group_runners', 'bronze', 1000) + create_or_update_plan_limit('ci_registered_group_runners', 'silver', 1000) + create_or_update_plan_limit('ci_registered_group_runners', 'gold', 1000) + + create_or_update_plan_limit('ci_registered_project_runners', 'free', 50) + create_or_update_plan_limit('ci_registered_project_runners', 'bronze', 1000) + create_or_update_plan_limit('ci_registered_project_runners', 'silver', 1000) + create_or_update_plan_limit('ci_registered_project_runners', 'gold', 1000) + end + + def down + %w[group project].each do |scope| + create_or_update_plan_limit("ci_registered_#{scope}_runners", 'free', 1000) + create_or_update_plan_limit("ci_registered_#{scope}_runners", 'bronze', 1000) + create_or_update_plan_limit("ci_registered_#{scope}_runners", 'silver', 1000) + create_or_update_plan_limit("ci_registered_#{scope}_runners", 'gold', 1000) + end + end +end |