Skip to content

Commit 12b23e2

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 36bfb0b commit 12b23e2

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

db/docs/catalog_resources.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
table_name: catalog_resources
3+
feature_categories:
4+
- pipeline_composition
5+
description: Projects containing a catalog resource.
6+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112482
7+
milestone: '15.10'
8+
gitlab_schema: gitlab_main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
class CreateCatalogResourcesTable < Gitlab::Database::Migration[2.1]
4+
def change
5+
create_table :catalog_resources do |t|
6+
t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade }
7+
8+
t.datetime_with_timezone :created_at, null: false
9+
end
10+
end
11+
end

db/schema_migrations/20230220163141

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5f0c9945aaf1f34cb9c79b6c3634f4fd44ac538469b3f97147be67a6f16c0c75

db/structure.sql

+25
Original file line numberDiff line numberDiff line change
@@ -12824,6 +12824,21 @@ CREATE SEQUENCE bulk_imports_id_seq
1282412824

1282512825
ALTER SEQUENCE bulk_imports_id_seq OWNED BY bulk_imports.id;
1282612826

12827+
CREATE TABLE catalog_resources (
12828+
id bigint NOT NULL,
12829+
project_id bigint NOT NULL,
12830+
created_at timestamp with time zone NOT NULL
12831+
);
12832+
12833+
CREATE SEQUENCE catalog_resources_id_seq
12834+
START WITH 1
12835+
INCREMENT BY 1
12836+
NO MINVALUE
12837+
NO MAXVALUE
12838+
CACHE 1;
12839+
12840+
ALTER SEQUENCE catalog_resources_id_seq OWNED BY catalog_resources.id;
12841+
1282712842
CREATE TABLE chat_names (
1282812843
id integer NOT NULL,
1282912844
user_id integer NOT NULL,
@@ -24410,6 +24425,8 @@ ALTER TABLE ONLY bulk_import_trackers ALTER COLUMN id SET DEFAULT nextval('bulk_
2441024425

2441124426
ALTER TABLE ONLY bulk_imports ALTER COLUMN id SET DEFAULT nextval('bulk_imports_id_seq'::regclass);
2441224427

24428+
ALTER TABLE ONLY catalog_resources ALTER COLUMN id SET DEFAULT nextval('catalog_resources_id_seq'::regclass);
24429+
2441324430
ALTER TABLE ONLY chat_names ALTER COLUMN id SET DEFAULT nextval('chat_names_id_seq'::regclass);
2441424431

2441524432
ALTER TABLE ONLY chat_teams ALTER COLUMN id SET DEFAULT nextval('chat_teams_id_seq'::regclass);
@@ -26176,6 +26193,9 @@ ALTER TABLE ONLY bulk_import_trackers
2617626193
ALTER TABLE ONLY bulk_imports
2617726194
ADD CONSTRAINT bulk_imports_pkey PRIMARY KEY (id);
2617826195

26196+
ALTER TABLE ONLY catalog_resources
26197+
ADD CONSTRAINT catalog_resources_pkey PRIMARY KEY (id);
26198+
2617926199
ALTER TABLE ONLY chat_names
2618026200
ADD CONSTRAINT chat_names_pkey PRIMARY KEY (id);
2618126201

@@ -29357,6 +29377,8 @@ CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_f
2935729377

2935829378
CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id);
2935929379

29380+
CREATE INDEX index_catalog_resources_on_project_id ON catalog_resources USING btree (project_id);
29381+
2936029382
CREATE INDEX index_chat_names_on_team_id_and_chat_id ON chat_names USING btree (team_id, chat_id);
2936129383

2936229384
CREATE INDEX index_chat_names_on_user_id ON chat_names USING btree (user_id);
@@ -35041,6 +35063,9 @@ ALTER TABLE ONLY users_security_dashboard_projects
3504135063
ALTER TABLE ONLY ci_build_report_results
3504235064
ADD CONSTRAINT fk_rails_16cb1ff064_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE;
3504335065

35066+
ALTER TABLE ONLY catalog_resources
35067+
ADD CONSTRAINT fk_rails_16f09e5c44 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
35068+
3504435069
ALTER TABLE ONLY project_deploy_tokens
3504535070
ADD CONSTRAINT fk_rails_170e03cbaf FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
3504635071

0 commit comments

Comments
 (0)