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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 01:02:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 01:02:13 +0300
commit516fba52cf280b9d5bad08dce9f0150f859b6cea (patch)
tree4dad71be856651af62c9a281b01087ae15480810 /db
parentc90be62bdefdb6bb67c73a9c4a6d164c9f78a28d (diff)
Add latest changes from gitlab-org/security/gitlab@13-4-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb9
-rw-r--r--db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb25
-rw-r--r--db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb20
-rw-r--r--db/schema_migrations/202008312046461
-rw-r--r--db/schema_migrations/202008312223471
-rw-r--r--db/schema_migrations/202009161208371
-rw-r--r--db/structure.sql5
7 files changed, 61 insertions, 1 deletions
diff --git a/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb b/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb
new file mode 100644
index 00000000000..d4bd2431d9c
--- /dev/null
+++ b/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddProjectFeatureFlagsToPlanLimits < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ add_column(:plan_limits, :project_feature_flags, :integer, default: 200, null: false)
+ end
+end
diff --git a/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb b/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb
new file mode 100644
index 00000000000..2c91016d9dd
--- /dev/null
+++ b/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class InsertProjectFeatureFlagsPlanLimits < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('project_feature_flags', 'free', 50)
+ create_or_update_plan_limit('project_feature_flags', 'bronze', 100)
+ create_or_update_plan_limit('project_feature_flags', 'silver', 150)
+ create_or_update_plan_limit('project_feature_flags', 'gold', 200)
+ end
+
+ def down
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('project_feature_flags', 'free', 0)
+ create_or_update_plan_limit('project_feature_flags', 'bronze', 0)
+ create_or_update_plan_limit('project_feature_flags', 'silver', 0)
+ create_or_update_plan_limit('project_feature_flags', 'gold', 0)
+ end
+end
diff --git a/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb b/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb
new file mode 100644
index 00000000000..3b0e4b99eb5
--- /dev/null
+++ b/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddIndexToMembersForUnacceptedInvitations < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ INDEX_NAME = 'idx_members_created_at_user_id_invite_token'
+ INDEX_SCOPE = 'invite_token IS NOT NULL AND user_id IS NULL'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index(:members, :created_at, where: INDEX_SCOPE, name: INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index(:members, :created_at, where: INDEX_SCOPE, name: INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20200831204646 b/db/schema_migrations/20200831204646
new file mode 100644
index 00000000000..ff4f71e8fc7
--- /dev/null
+++ b/db/schema_migrations/20200831204646
@@ -0,0 +1 @@
+06e87d83d5520e6ffbfb839d15a6dd02ad2caf5737136441d496e29e03a07e64 \ No newline at end of file
diff --git a/db/schema_migrations/20200831222347 b/db/schema_migrations/20200831222347
new file mode 100644
index 00000000000..6a01ea5cdc3
--- /dev/null
+++ b/db/schema_migrations/20200831222347
@@ -0,0 +1 @@
+00af22b19af29b453f0022ded835bd9246c602c63a04a51ef93cbedd47047753 \ No newline at end of file
diff --git a/db/schema_migrations/20200916120837 b/db/schema_migrations/20200916120837
new file mode 100644
index 00000000000..41ce56533b2
--- /dev/null
+++ b/db/schema_migrations/20200916120837
@@ -0,0 +1 @@
+ff246eb2761c4504b67b7d7b197990a671626038e50f1b82d6b3e4739a1ec3d4 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 99a070a3838..6e921810cfb 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -14362,7 +14362,8 @@ CREATE TABLE plan_limits (
npm_max_file_size bigint DEFAULT 524288000 NOT NULL,
nuget_max_file_size bigint DEFAULT 524288000 NOT NULL,
pypi_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL,
- generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL
+ generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL,
+ project_feature_flags integer DEFAULT 200 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -19312,6 +19313,8 @@ CREATE INDEX idx_jira_connect_subscriptions_on_installation_id ON jira_connect_s
CREATE UNIQUE INDEX idx_jira_connect_subscriptions_on_installation_id_namespace_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id, namespace_id);
+CREATE INDEX idx_members_created_at_user_id_invite_token ON members USING btree (created_at) WHERE ((invite_token IS NOT NULL) AND (user_id IS NULL));
+
CREATE INDEX idx_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND (state_id = 4));
CREATE INDEX idx_merge_requests_on_source_project_and_branch_state_opened ON merge_requests USING btree (source_project_id, source_branch) WHERE (state_id = 1);