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>2024-01-22 21:10:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-22 21:10:33 +0300
commita9a2f9257eae40935e03ca4185d5263bcb7ba45f (patch)
treef12875873819442e10ab04bd15fd975bf4bb7b64 /db
parent917d93d86da4dffd96abcfcf3aa83b0d6fa45286 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/docs/catalog_resource_components.yml11
-rw-r--r--db/docs/catalog_resource_versions.yml10
-rw-r--r--db/docs/catalog_resources.yml10
-rw-r--r--db/post_migrate/20240117070119_remove_index_protected_environments_on_project_id.rb17
-rw-r--r--db/schema_migrations/202401170701191
-rw-r--r--db/structure.sql2
6 files changed, 46 insertions, 5 deletions
diff --git a/db/docs/catalog_resource_components.yml b/db/docs/catalog_resource_components.yml
index 122e2f14265..0aa0d973bad 100644
--- a/db/docs/catalog_resource_components.yml
+++ b/db/docs/catalog_resource_components.yml
@@ -1,7 +1,16 @@
+---
table_name: catalog_resource_components
feature_categories:
- pipeline_composition
description: CI component available in the CI Catalog
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127775
milestone: '16.3'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/catalog_resource_versions.yml b/db/docs/catalog_resource_versions.yml
index f01dcd8a2d6..9eead9c4eef 100644
--- a/db/docs/catalog_resource_versions.yml
+++ b/db/docs/catalog_resource_versions.yml
@@ -5,4 +5,12 @@ feature_categories:
description: Catalog resource versions that contain valid CI components.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124668
milestone: '16.2'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/catalog_resources.yml b/db/docs/catalog_resources.yml
index 5bc689c308e..416463ed9fe 100644
--- a/db/docs/catalog_resources.yml
+++ b/db/docs/catalog_resources.yml
@@ -5,4 +5,12 @@ feature_categories:
description: Projects containing a catalog resource.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112482
milestone: '15.10'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/post_migrate/20240117070119_remove_index_protected_environments_on_project_id.rb b/db/post_migrate/20240117070119_remove_index_protected_environments_on_project_id.rb
new file mode 100644
index 00000000000..dc66a7bb84c
--- /dev/null
+++ b/db/post_migrate/20240117070119_remove_index_protected_environments_on_project_id.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveIndexProtectedEnvironmentsOnProjectId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.9'
+
+ INDEX_NAME = 'index_protected_environments_on_project_id'
+
+ def up
+ remove_concurrent_index_by_name :protected_environments, name: INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :protected_environments, :project_id, name: INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20240117070119 b/db/schema_migrations/20240117070119
new file mode 100644
index 00000000000..a9909fe3d11
--- /dev/null
+++ b/db/schema_migrations/20240117070119
@@ -0,0 +1 @@
+1becea9a8277072f40d0fa7325338ae92e698b39e7c84b1be8ffe52832ef6794 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index d9ceb1e6a9a..763cf0dc349 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -35115,8 +35115,6 @@ CREATE INDEX index_protected_environments_on_approval_count_and_created_at ON pr
CREATE UNIQUE INDEX index_protected_environments_on_group_id_and_name ON protected_environments USING btree (group_id, name) WHERE (group_id IS NOT NULL);
-CREATE INDEX index_protected_environments_on_project_id ON protected_environments USING btree (project_id);
-
CREATE UNIQUE INDEX index_protected_environments_on_project_id_and_name ON protected_environments USING btree (project_id, name);
CREATE INDEX index_protected_tag_create_access ON protected_tag_create_access_levels USING btree (protected_tag_id);