summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 06:09:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 06:09:00 +0000
commita496f41f60e12a0a5c31482b7594ad547e0ade42 (patch)
tree2248f3ec4451bca9e5fca08c7761c846c5285b7f /db
parentd393deba773bb1fab09273850fe5d5986066d76d (diff)
downloadgitlab-ce-a496f41f60e12a0a5c31482b7594ad547e0ade42.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb9
-rw-r--r--db/migrate/20200212134201_insert_group_hooks_plan_limits.rb23
-rw-r--r--db/schema.rb1
3 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb b/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb
new file mode 100644
index 00000000000..4e279ff903d
--- /dev/null
+++ b/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddGroupHooksToPlanLimits < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ add_column(:plan_limits, :group_hooks, :integer, default: 0, null: false)
+ end
+end
diff --git a/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb b/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb
new file mode 100644
index 00000000000..a2963cfaf4d
--- /dev/null
+++ b/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class InsertGroupHooksPlanLimits < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('group_hooks', 'bronze', 50)
+ create_or_update_plan_limit('group_hooks', 'silver', 50)
+ create_or_update_plan_limit('group_hooks', 'gold', 50)
+ end
+
+ def down
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('group_hooks', 'bronze', 0)
+ create_or_update_plan_limit('group_hooks', 'silver', 0)
+ create_or_update_plan_limit('group_hooks', 'gold', 0)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 36bf8ad5e01..ac647a9eadf 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3109,6 +3109,7 @@ ActiveRecord::Schema.define(version: 2020_02_24_163804) do
t.integer "ci_pipeline_size", default: 0, null: false
t.integer "ci_active_jobs", default: 0, null: false
t.integer "project_hooks", default: 0, null: false
+ t.integer "group_hooks", default: 0, null: false
t.index ["plan_id"], name: "index_plan_limits_on_plan_id", unique: true
end