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>2022-07-27 22:06:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 22:06:32 +0300
commit62e0c3c7d73f028e4c6c8c179d6f04f811a0859f (patch)
tree69d0c42cb329dd5c64997243608e745dcef77c38 /db
parentbbcd372db175c8f19b4b72453ff57c9a19887c5f (diff)
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb20
-rw-r--r--db/schema_migrations/202203291303301
-rw-r--r--db/structure.sql5
3 files changed, 25 insertions, 1 deletions
diff --git a/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb b/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb
new file mode 100644
index 00000000000..b1d0ac64d42
--- /dev/null
+++ b/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddAuthorToCiSubscriptionsProjects < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ci_subscriptions_projects_author_id'
+
+ def up
+ unless column_exists?(:ci_subscriptions_projects, :author_id)
+ add_column :ci_subscriptions_projects, :author_id, :bigint
+ end
+
+ add_concurrent_index :ci_subscriptions_projects, :author_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :ci_subscriptions_projects, INDEX_NAME
+ remove_column :ci_subscriptions_projects, :author_id
+ end
+end
diff --git a/db/schema_migrations/20220329130330 b/db/schema_migrations/20220329130330
new file mode 100644
index 00000000000..367d43a89a2
--- /dev/null
+++ b/db/schema_migrations/20220329130330
@@ -0,0 +1 @@
+8726707f9f4bb8d256886c592b6a11ba8487de24f5340c837800f5ce0c32df9d \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 28082885574..cc1e6dfb288 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -13289,7 +13289,8 @@ ALTER SEQUENCE ci_stages_id_seq OWNED BY ci_stages.id;
CREATE TABLE ci_subscriptions_projects (
id bigint NOT NULL,
downstream_project_id bigint NOT NULL,
- upstream_project_id bigint NOT NULL
+ upstream_project_id bigint NOT NULL,
+ author_id bigint
);
CREATE SEQUENCE ci_subscriptions_projects_id_seq
@@ -27805,6 +27806,8 @@ CREATE INDEX index_ci_stages_on_pipeline_id_and_position ON ci_stages USING btre
CREATE INDEX index_ci_stages_on_project_id ON ci_stages USING btree (project_id);
+CREATE INDEX index_ci_subscriptions_projects_author_id ON ci_subscriptions_projects USING btree (author_id);
+
CREATE INDEX index_ci_subscriptions_projects_on_upstream_project_id ON ci_subscriptions_projects USING btree (upstream_project_id);
CREATE UNIQUE INDEX index_ci_subscriptions_projects_unique_subscription ON ci_subscriptions_projects USING btree (downstream_project_id, upstream_project_id);