summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200108100603_update_project_hooks_limit.rb23
-rw-r--r--db/schema.rb2
2 files changed, 24 insertions, 1 deletions
diff --git a/db/migrate/20200108100603_update_project_hooks_limit.rb b/db/migrate/20200108100603_update_project_hooks_limit.rb
new file mode 100644
index 00000000000..91533b69afa
--- /dev/null
+++ b/db/migrate/20200108100603_update_project_hooks_limit.rb
@@ -0,0 +1,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
diff --git a/db/schema.rb b/db/schema.rb
index ca27c33d6f1..1d2b4020915 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2020_01_06_085831) do
+ActiveRecord::Schema.define(version: 2020_01_08_100603) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"