summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 23:13:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 23:13:44 +0000
commit63f0bc0999ba2c4a7778097aacc6b87efd39e9e6 (patch)
tree6a75a0a171089fae908f43b5ba61ca7c648862b5 /db
parentefdc7889a59a7e5a52f8bacb578de2d40beb5871 (diff)
downloadgitlab-ce-63f0bc0999ba2c4a7778097aacc6b87efd39e9e6.tar.gz
Add latest changes from gitlab-org/security/gitlab@13-8-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb9
-rw-r--r--db/migrate/20201007033723_insert_daily_invites_plan_limits.rb25
-rw-r--r--db/schema_migrations/202010070335271
-rw-r--r--db/schema_migrations/202010070337231
-rw-r--r--db/structure.sql3
5 files changed, 38 insertions, 1 deletions
diff --git a/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb b/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb
new file mode 100644
index 00000000000..8f0079cd639
--- /dev/null
+++ b/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddDailyInvitesToPlanLimits < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ add_column(:plan_limits, :daily_invites, :integer, default: 0, null: false)
+ end
+end
diff --git a/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb b/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb
new file mode 100644
index 00000000000..dcdcbbb0964
--- /dev/null
+++ b/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class InsertDailyInvitesPlanLimits < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('daily_invites', 'free', 20)
+ create_or_update_plan_limit('daily_invites', 'bronze', 0)
+ create_or_update_plan_limit('daily_invites', 'silver', 0)
+ create_or_update_plan_limit('daily_invites', 'gold', 0)
+ end
+
+ def down
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('daily_invites', 'free', 0)
+ create_or_update_plan_limit('daily_invites', 'bronze', 0)
+ create_or_update_plan_limit('daily_invites', 'silver', 0)
+ create_or_update_plan_limit('daily_invites', 'gold', 0)
+ end
+end
diff --git a/db/schema_migrations/20201007033527 b/db/schema_migrations/20201007033527
new file mode 100644
index 00000000000..b2cedd57973
--- /dev/null
+++ b/db/schema_migrations/20201007033527
@@ -0,0 +1 @@
+1200747265d5095a86250020786d6f1e9e50bc75328a71de497046807afa89d7 \ No newline at end of file
diff --git a/db/schema_migrations/20201007033723 b/db/schema_migrations/20201007033723
new file mode 100644
index 00000000000..c874ae0475b
--- /dev/null
+++ b/db/schema_migrations/20201007033723
@@ -0,0 +1 @@
+febefead6f966960f6493d29add5f35fc4a1080b5118c5526502fa5fe1d29023 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index de4218ed405..c1f13a2fca4 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -15254,7 +15254,8 @@ CREATE TABLE plan_limits (
project_feature_flags integer DEFAULT 200 NOT NULL,
ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL,
ci_pipeline_deployments integer DEFAULT 500 NOT NULL,
- pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL
+ pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL,
+ daily_invites integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq