diff options
Diffstat (limited to 'db/migrate/20230321161441_insert_project_access_token_limit.rb')
-rw-r--r-- | db/migrate/20230321161441_insert_project_access_token_limit.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20230321161441_insert_project_access_token_limit.rb b/db/migrate/20230321161441_insert_project_access_token_limit.rb new file mode 100644 index 00000000000..a449e6f8e7c --- /dev/null +++ b/db/migrate/20230321161441_insert_project_access_token_limit.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class InsertProjectAccessTokenLimit < Gitlab::Database::Migration[2.1] + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + create_or_update_plan_limit('project_access_token_limit', 'premium_trial', 1) + create_or_update_plan_limit('project_access_token_limit', 'ultimate_trial', 1) + end + + def down + create_or_update_plan_limit('project_access_token_limit', 'premium_trial', 0) + create_or_update_plan_limit('project_access_token_limit', 'ultimate_trial', 0) + end +end |