summaryrefslogtreecommitdiff
path: root/db/structure.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/structure.sql')
-rw-r--r--db/structure.sql157
1 files changed, 128 insertions, 29 deletions
diff --git a/db/structure.sql b/db/structure.sql
index acf40d37086..e4b1614ff33 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11279,8 +11279,8 @@ CREATE TABLE appearances (
email_header_and_footer_enabled boolean DEFAULT false NOT NULL,
profile_image_guidelines text,
profile_image_guidelines_html text,
- pwa_short_name text,
pwa_icon text,
+ pwa_short_name text,
pwa_name text,
pwa_description text,
CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)),
@@ -11694,10 +11694,6 @@ CREATE TABLE application_settings (
database_grafana_api_url text,
database_grafana_tag text,
public_runner_releases_url text DEFAULT 'https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-runner/releases'::text NOT NULL,
- password_uppercase_required boolean DEFAULT false NOT NULL,
- password_lowercase_required boolean DEFAULT false NOT NULL,
- password_number_required boolean DEFAULT false NOT NULL,
- password_symbol_required boolean DEFAULT false NOT NULL,
encrypted_arkose_labs_public_api_key bytea,
encrypted_arkose_labs_public_api_key_iv bytea,
encrypted_arkose_labs_private_api_key bytea,
@@ -11708,14 +11704,14 @@ CREATE TABLE application_settings (
inactive_projects_min_size_mb integer DEFAULT 0 NOT NULL,
inactive_projects_send_warning_email_after_months integer DEFAULT 1 NOT NULL,
delayed_group_deletion boolean DEFAULT true NOT NULL,
- maven_package_requests_forwarding boolean DEFAULT true NOT NULL,
arkose_labs_namespace text DEFAULT 'client'::text NOT NULL,
max_export_size integer DEFAULT 0,
- encrypted_slack_app_signing_secret bytea,
- encrypted_slack_app_signing_secret_iv bytea,
container_registry_pre_import_timeout integer DEFAULT 1800 NOT NULL,
container_registry_import_timeout integer DEFAULT 600 NOT NULL,
pipeline_limit_per_project_user_sha integer DEFAULT 0 NOT NULL,
+ encrypted_slack_app_signing_secret bytea,
+ encrypted_slack_app_signing_secret_iv bytea,
+ globally_allowed_ips text DEFAULT ''::text NOT NULL,
dingtalk_integration_enabled boolean DEFAULT false NOT NULL,
encrypted_dingtalk_corpid bytea,
encrypted_dingtalk_corpid_iv bytea,
@@ -11723,8 +11719,11 @@ CREATE TABLE application_settings (
encrypted_dingtalk_app_key_iv bytea,
encrypted_dingtalk_app_secret bytea,
encrypted_dingtalk_app_secret_iv bytea,
+ password_uppercase_required boolean DEFAULT false NOT NULL,
+ password_lowercase_required boolean DEFAULT false NOT NULL,
+ password_number_required boolean DEFAULT false NOT NULL,
+ password_symbol_required boolean DEFAULT false NOT NULL,
jira_connect_application_key text,
- globally_allowed_ips text DEFAULT ''::text NOT NULL,
container_registry_pre_import_tags_rate numeric(6,2) DEFAULT 0.5 NOT NULL,
license_usage_data_exported boolean DEFAULT false NOT NULL,
phone_verification_code_enabled boolean DEFAULT false NOT NULL,
@@ -11739,33 +11738,34 @@ CREATE TABLE application_settings (
error_tracking_api_url text,
git_rate_limit_users_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
error_tracking_access_token_encrypted text,
- invitation_flow_enforcement boolean DEFAULT false NOT NULL,
package_registry_cleanup_policies_worker_capacity integer DEFAULT 2 NOT NULL,
deactivate_dormant_users_period integer DEFAULT 90 NOT NULL,
auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL,
+ invitation_flow_enforcement boolean DEFAULT false NOT NULL,
max_pages_custom_domains_per_project integer DEFAULT 0 NOT NULL,
cube_api_base_url text,
encrypted_cube_api_key bytea,
encrypted_cube_api_key_iv bytea,
- jitsu_host text,
- jitsu_project_xid text,
- jitsu_administrator_email text,
- encrypted_jitsu_administrator_password bytea,
- encrypted_jitsu_administrator_password_iv bytea,
+ maven_package_requests_forwarding boolean DEFAULT true NOT NULL,
dashboard_limit_enabled boolean DEFAULT false NOT NULL,
dashboard_limit integer DEFAULT 0 NOT NULL,
dashboard_notification_limit integer DEFAULT 0 NOT NULL,
dashboard_enforcement_limit integer DEFAULT 0 NOT NULL,
dashboard_limit_new_namespace_creation_enforcement_date date,
+ jitsu_host text,
+ jitsu_project_xid text,
+ jitsu_administrator_email text,
+ encrypted_jitsu_administrator_password bytea,
+ encrypted_jitsu_administrator_password_iv bytea,
can_create_group boolean DEFAULT true NOT NULL,
lock_maven_package_requests_forwarding boolean DEFAULT false NOT NULL,
lock_pypi_package_requests_forwarding boolean DEFAULT false NOT NULL,
lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL,
- jira_connect_proxy_url text,
password_expiration_enabled boolean DEFAULT false NOT NULL,
password_expires_in_days integer DEFAULT 90 NOT NULL,
password_expires_notice_before_days integer DEFAULT 7 NOT NULL,
product_analytics_enabled boolean DEFAULT false NOT NULL,
+ jira_connect_proxy_url text,
email_confirmation_setting smallint DEFAULT 0,
disable_admin_oauth_scopes boolean DEFAULT false NOT NULL,
default_preferred_language text DEFAULT 'en'::text NOT NULL,
@@ -11774,37 +11774,37 @@ CREATE TABLE application_settings (
encrypted_telesign_customer_xid_iv bytea,
encrypted_telesign_api_key bytea,
encrypted_telesign_api_key_iv bytea,
- disable_personal_access_tokens boolean DEFAULT false NOT NULL,
max_terraform_state_size_bytes integer DEFAULT 0 NOT NULL,
+ disable_personal_access_tokens boolean DEFAULT false NOT NULL,
bulk_import_enabled boolean DEFAULT false NOT NULL,
- allow_runner_registration_token boolean DEFAULT true NOT NULL,
user_defaults_to_private_profile boolean DEFAULT false NOT NULL,
- allow_possible_spam boolean DEFAULT false NOT NULL,
- default_syntax_highlighting_theme integer DEFAULT 1 NOT NULL,
+ allow_runner_registration_token boolean DEFAULT true NOT NULL,
encrypted_product_analytics_clickhouse_connection_string bytea,
encrypted_product_analytics_clickhouse_connection_string_iv bytea,
+ allow_possible_spam boolean DEFAULT false NOT NULL,
search_max_shard_size_gb integer DEFAULT 50 NOT NULL,
search_max_docs_denominator integer DEFAULT 5000000 NOT NULL,
search_min_docs_before_rollover integer DEFAULT 100000 NOT NULL,
deactivation_email_additional_text text,
- jira_connect_public_key_storage_enabled boolean DEFAULT false NOT NULL,
git_rate_limit_users_alertlist integer[] DEFAULT '{}'::integer[] NOT NULL,
- allow_deploy_tokens_and_keys_with_external_authn boolean DEFAULT false NOT NULL,
+ jira_connect_public_key_storage_enabled boolean DEFAULT false NOT NULL,
security_policy_global_group_approvers_enabled boolean DEFAULT true NOT NULL,
+ default_syntax_highlighting_theme integer DEFAULT 1 NOT NULL,
+ allow_deploy_tokens_and_keys_with_external_authn boolean DEFAULT false NOT NULL,
projects_api_rate_limit_unauthenticated integer DEFAULT 400 NOT NULL,
deny_all_requests_except_allowed boolean DEFAULT false NOT NULL,
product_analytics_data_collector_host text,
lock_memberships_to_saml boolean DEFAULT false NOT NULL,
- gitlab_dedicated_instance boolean DEFAULT false NOT NULL,
update_runner_versions_enabled boolean DEFAULT true NOT NULL,
+ gitlab_dedicated_instance boolean DEFAULT false NOT NULL,
database_apdex_settings jsonb,
encrypted_openai_api_key bytea,
encrypted_openai_api_key_iv bytea,
database_max_running_batched_background_migrations integer DEFAULT 2 NOT NULL,
- encrypted_product_analytics_configurator_connection_string bytea,
- encrypted_product_analytics_configurator_connection_string_iv bytea,
silent_mode_enabled boolean DEFAULT false NOT NULL,
package_metadata_purl_types smallint[] DEFAULT '{}'::smallint[],
+ encrypted_product_analytics_configurator_connection_string bytea,
+ encrypted_product_analytics_configurator_connection_string_iv bytea,
ci_max_includes integer DEFAULT 150 NOT NULL,
encrypted_tofa_credentials bytea,
encrypted_tofa_credentials_iv bytea,
@@ -18724,13 +18724,13 @@ CREATE TABLE namespace_settings (
runner_token_expiration_interval integer,
subgroup_runner_token_expiration_interval integer,
project_runner_token_expiration_interval integer,
- show_diff_preview_in_email boolean DEFAULT true NOT NULL,
enabled_git_access_protocol smallint DEFAULT 0 NOT NULL,
unique_project_download_limit smallint DEFAULT 0 NOT NULL,
unique_project_download_limit_interval_in_seconds integer DEFAULT 0 NOT NULL,
project_import_level smallint DEFAULT 50 NOT NULL,
unique_project_download_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL,
+ show_diff_preview_in_email boolean DEFAULT true NOT NULL,
only_allow_merge_if_pipeline_succeeds boolean DEFAULT false NOT NULL,
allow_merge_on_skipped_pipeline boolean DEFAULT false NOT NULL,
only_allow_merge_if_all_discussions_are_resolved boolean DEFAULT false NOT NULL,
@@ -20117,6 +20117,7 @@ CREATE TABLE plan_limits (
helm_max_file_size bigint DEFAULT 5242880 NOT NULL,
ci_registered_group_runners integer DEFAULT 1000 NOT NULL,
ci_registered_project_runners integer DEFAULT 1000 NOT NULL,
+ web_hook_calls integer DEFAULT 0 NOT NULL,
ci_daily_pipeline_schedule_triggers integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_running_container_scanning integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_cluster_image_scanning integer DEFAULT 0 NOT NULL,
@@ -20141,7 +20142,6 @@ CREATE TABLE plan_limits (
enforcement_limit integer DEFAULT 0 NOT NULL,
notification_limit integer DEFAULT 0 NOT NULL,
dashboard_limit_enabled_at timestamp with time zone,
- web_hook_calls integer DEFAULT 0 NOT NULL,
project_access_token_limit integer DEFAULT 0 NOT NULL
);
@@ -21186,11 +21186,11 @@ CREATE TABLE project_settings (
target_platforms character varying[] DEFAULT '{}'::character varying[] NOT NULL,
enforce_auth_checks_on_uploads boolean DEFAULT true NOT NULL,
selective_code_owner_removals boolean DEFAULT false NOT NULL,
- issue_branch_template text,
show_diff_preview_in_email boolean DEFAULT true NOT NULL,
- jitsu_key text,
suggested_reviewers_enabled boolean DEFAULT false NOT NULL,
+ jitsu_key text,
only_allow_merge_if_all_status_checks_passed boolean DEFAULT false NOT NULL,
+ issue_branch_template text,
mirror_branch_regex text,
allow_pipeline_trigger_approve_deployment boolean DEFAULT false NOT NULL,
emails_enabled boolean DEFAULT true NOT NULL,
@@ -21821,6 +21821,25 @@ CREATE SEQUENCE releases_id_seq
ALTER SEQUENCE releases_id_seq OWNED BY releases.id;
+CREATE TABLE remote_development_agent_configs (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ cluster_agent_id bigint NOT NULL,
+ enabled boolean NOT NULL,
+ dns_zone text NOT NULL,
+ CONSTRAINT check_9f5cd54d1c CHECK ((char_length(dns_zone) <= 256))
+);
+
+CREATE SEQUENCE remote_development_agent_configs_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE remote_development_agent_configs_id_seq OWNED BY remote_development_agent_configs.id;
+
CREATE TABLE remote_mirrors (
id integer NOT NULL,
project_id integer,
@@ -24598,6 +24617,49 @@ CREATE SEQUENCE work_item_widget_definitions_id_seq
ALTER SEQUENCE work_item_widget_definitions_id_seq OWNED BY work_item_widget_definitions.id;
+CREATE TABLE workspaces (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ user_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ cluster_agent_id bigint NOT NULL,
+ desired_state_updated_at timestamp with time zone NOT NULL,
+ responded_to_agent_at timestamp with time zone,
+ max_hours_before_termination smallint NOT NULL,
+ name text NOT NULL,
+ namespace text NOT NULL,
+ desired_state text NOT NULL,
+ actual_state text NOT NULL,
+ editor text NOT NULL,
+ devfile_ref text NOT NULL,
+ devfile_path text NOT NULL,
+ devfile text,
+ processed_devfile text,
+ url text NOT NULL,
+ deployment_resource_version text,
+ CONSTRAINT check_15543fb0fa CHECK ((char_length(name) <= 64)),
+ CONSTRAINT check_157d5f955c CHECK ((char_length(namespace) <= 64)),
+ CONSTRAINT check_2b401b0034 CHECK ((char_length(deployment_resource_version) <= 64)),
+ CONSTRAINT check_77d1a2ff50 CHECK ((char_length(processed_devfile) <= 65535)),
+ CONSTRAINT check_8e363ee3ad CHECK ((char_length(devfile_ref) <= 256)),
+ CONSTRAINT check_8e4db5ffc2 CHECK ((char_length(actual_state) <= 32)),
+ CONSTRAINT check_9e42558c35 CHECK ((char_length(url) <= 1024)),
+ CONSTRAINT check_b70eddcbc1 CHECK ((char_length(desired_state) <= 32)),
+ CONSTRAINT check_d7ed376e49 CHECK ((char_length(editor) <= 256)),
+ CONSTRAINT check_dc58d56169 CHECK ((char_length(devfile_path) <= 2048)),
+ CONSTRAINT check_eb32879a3d CHECK ((char_length(devfile) <= 65535))
+);
+
+CREATE SEQUENCE workspaces_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE workspaces_id_seq OWNED BY workspaces.id;
+
CREATE TABLE x509_certificates (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -25597,6 +25659,8 @@ ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_link
ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq'::regclass);
+ALTER TABLE ONLY remote_development_agent_configs ALTER COLUMN id SET DEFAULT nextval('remote_development_agent_configs_id_seq'::regclass);
+
ALTER TABLE ONLY remote_mirrors ALTER COLUMN id SET DEFAULT nextval('remote_mirrors_id_seq'::regclass);
ALTER TABLE ONLY required_code_owners_sections ALTER COLUMN id SET DEFAULT nextval('required_code_owners_sections_id_seq'::regclass);
@@ -25837,6 +25901,8 @@ ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_
ALTER TABLE ONLY work_item_widget_definitions ALTER COLUMN id SET DEFAULT nextval('work_item_widget_definitions_id_seq'::regclass);
+ALTER TABLE ONLY workspaces ALTER COLUMN id SET DEFAULT nextval('workspaces_id_seq'::regclass);
+
ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass);
ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass);
@@ -27972,6 +28038,9 @@ ALTER TABLE releases
ALTER TABLE ONLY releases
ADD CONSTRAINT releases_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY remote_development_agent_configs
+ ADD CONSTRAINT remote_development_agent_configs_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY remote_mirrors
ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id);
@@ -28383,6 +28452,9 @@ ALTER TABLE ONLY work_item_types
ALTER TABLE ONLY work_item_widget_definitions
ADD CONSTRAINT work_item_widget_definitions_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY workspaces
+ ADD CONSTRAINT workspaces_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY x509_certificates
ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id);
@@ -31354,6 +31426,8 @@ CREATE UNIQUE INDEX index_merge_request_reviewers_on_merge_request_id_and_user_i
CREATE INDEX index_merge_request_reviewers_on_user_id ON merge_request_reviewers USING btree (user_id);
+CREATE UNIQUE INDEX index_merge_request_user_mentions_note_id_convert_to_bigint ON merge_request_user_mentions USING btree (note_id_convert_to_bigint) WHERE (note_id_convert_to_bigint IS NOT NULL);
+
CREATE UNIQUE INDEX index_merge_request_user_mentions_on_note_id ON merge_request_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL);
CREATE INDEX index_merge_requests_closing_issues_on_issue_id ON merge_requests_closing_issues USING btree (issue_id);
@@ -32224,6 +32298,8 @@ CREATE UNIQUE INDEX index_releases_on_project_tag_unique ON releases USING btree
CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at);
+CREATE INDEX index_remote_development_agent_configs_on_cluster_agent_id ON remote_development_agent_configs USING btree (cluster_agent_id);
+
CREATE INDEX index_remote_mirrors_on_last_successful_update_at ON remote_mirrors USING btree (last_successful_update_at);
CREATE INDEX index_remote_mirrors_on_project_id ON remote_mirrors USING btree (project_id);
@@ -33032,6 +33108,14 @@ CREATE UNIQUE INDEX index_work_item_widget_definitions_on_namespace_type_and_nam
CREATE INDEX index_work_item_widget_definitions_on_work_item_type_id ON work_item_widget_definitions USING btree (work_item_type_id);
+CREATE INDEX index_workspaces_on_cluster_agent_id ON workspaces USING btree (cluster_agent_id);
+
+CREATE UNIQUE INDEX index_workspaces_on_name ON workspaces USING btree (name);
+
+CREATE INDEX index_workspaces_on_project_id ON workspaces USING btree (project_id);
+
+CREATE INDEX index_workspaces_on_user_id ON workspaces USING btree (user_id);
+
CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier);
CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id);
@@ -34718,6 +34802,9 @@ ALTER TABLE ONLY user_interacted_projects
ALTER TABLE ONLY merge_request_assignment_events
ADD CONSTRAINT fk_08f7602bfd FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+ALTER TABLE ONLY remote_development_agent_configs
+ ADD CONSTRAINT fk_0a3c0ada56 FOREIGN KEY (cluster_agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT fk_0a57f2271b FOREIGN KEY (dast_site_validation_id) REFERENCES dast_site_validations(id) ON DELETE SET NULL;
@@ -35405,6 +35492,9 @@ ALTER TABLE ONLY resource_link_events
ALTER TABLE ONLY metrics_users_starred_dashboards
ADD CONSTRAINT fk_bd6ae32fac FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY workspaces
+ ADD CONSTRAINT fk_bdb0b31131 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY project_compliance_framework_settings
ADD CONSTRAINT fk_be413374a9 FOREIGN KEY (framework_id) REFERENCES compliance_management_frameworks(id) ON DELETE CASCADE;
@@ -35549,6 +35639,9 @@ ALTER TABLE ONLY web_hooks
ALTER TABLE ONLY security_scans
ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY workspaces
+ ADD CONSTRAINT fk_dc7c316be1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_dccd3f98fc FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -35654,6 +35747,9 @@ ALTER TABLE ONLY user_project_callouts
ALTER TABLE ONLY approval_merge_request_rules
ADD CONSTRAINT fk_f726c79756 FOREIGN KEY (scan_result_policy_id) REFERENCES scan_result_policies(id) ON DELETE CASCADE;
+ALTER TABLE ONLY workspaces
+ ADD CONSTRAINT fk_f78aeddc77 FOREIGN KEY (cluster_agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT fk_f7d43dee13 FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -35684,6 +35780,9 @@ ALTER TABLE ONLY issues
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_geo_event_log_on_geo_event_id FOREIGN KEY (geo_event_id) REFERENCES geo_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY merge_request_user_mentions
+ ADD CONSTRAINT fk_merge_request_user_mentions_note_id_convert_to_bigint FOREIGN KEY (note_id_convert_to_bigint) REFERENCES notes(id) ON DELETE CASCADE NOT VALID;
+
ALTER TABLE ONLY ml_candidate_metrics
ADD CONSTRAINT fk_ml_candidate_metrics_on_candidate_id FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id) ON DELETE CASCADE;