diff options
Diffstat (limited to 'db/structure.sql')
-rw-r--r-- | db/structure.sql | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/db/structure.sql b/db/structure.sql index 97a2850fd5c..5e1fc008256 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11026,6 +11026,8 @@ CREATE TABLE cluster_agent_tokens ( agent_id bigint NOT NULL, token_encrypted text NOT NULL, created_by_user_id bigint, + description text, + CONSTRAINT check_4e4ec5070a CHECK ((char_length(description) <= 1024)), CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255)) ); @@ -11607,6 +11609,7 @@ CREATE TABLE custom_emoji ( name text NOT NULL, file text NOT NULL, external boolean DEFAULT true NOT NULL, + creator_id bigint NOT NULL, CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)), CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255)) ); @@ -13544,6 +13547,30 @@ CREATE TABLE issues_self_managed_prometheus_alert_events ( updated_at timestamp with time zone NOT NULL ); +CREATE TABLE iterations_cadences ( + id bigint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + start_date date NOT NULL, + last_run_date date, + duration_in_weeks integer, + iterations_in_advance integer, + active boolean DEFAULT true NOT NULL, + automatic boolean DEFAULT true NOT NULL, + title text NOT NULL, + CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255)) +); + +CREATE SEQUENCE iterations_cadences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE iterations_cadences_id_seq OWNED BY iterations_cadences.id; + CREATE TABLE jira_connect_installations ( id bigint NOT NULL, client_key character varying, @@ -14506,7 +14533,8 @@ CREATE TABLE notification_settings ( fixed_pipeline boolean, new_release boolean, moved_project boolean DEFAULT true NOT NULL, - change_reviewer_merge_request boolean + change_reviewer_merge_request boolean, + merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL ); CREATE SEQUENCE notification_settings_id_seq @@ -17357,6 +17385,7 @@ CREATE TABLE sprints ( description text, description_html text, state_enum smallint DEFAULT 1 NOT NULL, + iterations_cadence_id integer, CONSTRAINT sprints_must_belong_to_project_or_group CHECK ((((project_id <> NULL::bigint) AND (group_id IS NULL)) OR ((group_id <> NULL::bigint) AND (project_id IS NULL)))), CONSTRAINT sprints_title CHECK ((char_length(title) <= 255)) ); @@ -19068,6 +19097,8 @@ ALTER TABLE ONLY issue_user_mentions ALTER COLUMN id SET DEFAULT nextval('issue_ ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass); +ALTER TABLE ONLY iterations_cadences ALTER COLUMN id SET DEFAULT nextval('iterations_cadences_id_seq'::regclass); + ALTER TABLE ONLY jira_connect_installations ALTER COLUMN id SET DEFAULT nextval('jira_connect_installations_id_seq'::regclass); ALTER TABLE ONLY jira_connect_subscriptions ALTER COLUMN id SET DEFAULT nextval('jira_connect_subscriptions_id_seq'::regclass); @@ -20368,6 +20399,9 @@ ALTER TABLE ONLY sprints ALTER TABLE ONLY sprints ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((project_id IS NOT NULL)); +ALTER TABLE ONLY iterations_cadences + ADD CONSTRAINT iterations_cadences_pkey PRIMARY KEY (id); + ALTER TABLE ONLY jira_connect_installations ADD CONSTRAINT jira_connect_installations_pkey PRIMARY KEY (id); @@ -21937,6 +21971,8 @@ CREATE INDEX index_csv_issue_imports_on_project_id ON csv_issue_imports USING bt CREATE INDEX index_csv_issue_imports_on_user_id ON csv_issue_imports USING btree (user_id); +CREATE INDEX index_custom_emoji_on_creator_id ON custom_emoji USING btree (creator_id); + CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON custom_emoji USING btree (namespace_id, name); CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); @@ -22441,6 +22477,8 @@ CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at); CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); +CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING btree (group_id); + CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key); CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id); @@ -23431,6 +23469,8 @@ CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_po CREATE UNIQUE INDEX index_sop_configs_on_security_policy_management_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id); +CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id); + CREATE INDEX index_sprints_on_description_trigram ON sprints USING gin (description gin_trgm_ops); CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date); @@ -24268,6 +24308,9 @@ ALTER TABLE ONLY namespaces ALTER TABLE ONLY epics ADD CONSTRAINT fk_3654b61b03 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY sprints + ADD CONSTRAINT fk_365d1db505 FOREIGN KEY (iterations_cadence_id) REFERENCES iterations_cadences(id) ON DELETE CASCADE; + ALTER TABLE ONLY push_event_payloads ADD CONSTRAINT fk_36c74129da FOREIGN KEY (event_id) REFERENCES events(id) ON DELETE CASCADE; @@ -24649,6 +24692,9 @@ ALTER TABLE ONLY todos ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_cff7185ad2 FOREIGN KEY (reset_checksum_event_id) REFERENCES geo_reset_checksum_events(id) ON DELETE CASCADE; +ALTER TABLE ONLY custom_emoji + ADD CONSTRAINT fk_custom_emoji_creator_id FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY bulk_import_entities ADD CONSTRAINT fk_d06d023c30 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -26143,6 +26189,9 @@ ALTER TABLE ONLY alert_management_alert_user_mentions ALTER TABLE ONLY snippet_statistics ADD CONSTRAINT fk_rails_ebc283ccf1 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE; +ALTER TABLE ONLY iterations_cadences + ADD CONSTRAINT fk_rails_ece400c55a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY dast_profiles ADD CONSTRAINT fk_rails_ed1e66fbbf FOREIGN KEY (dast_site_profile_id) REFERENCES dast_site_profiles(id) ON DELETE CASCADE; |