Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200108100603_update_project_hooks_limit.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 91533b69afa9d5fd02ad438d3f09b84a703ecf35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

class UpdateProjectHooksLimit < ActiveRecord::Migration[5.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    return unless Gitlab.com?

    create_or_update_plan_limit('project_hooks', 'free', 100)
    create_or_update_plan_limit('project_hooks', 'bronze', 100)
    create_or_update_plan_limit('project_hooks', 'silver', 100)
  end

  def down
    return unless Gitlab.com?

    create_or_update_plan_limit('project_hooks', 'free', 10)
    create_or_update_plan_limit('project_hooks', 'bronze', 20)
    create_or_update_plan_limit('project_hooks', 'silver', 30)
  end
end