Files
gitlab-foss/config/gitlab_loose_foreign_keys.yml
2025-07-20 10:29:38 +00:00

889 lines
21 KiB
YAML

---
abuse_report_assignees:
- table: users
column: user_id
on_delete: async_delete
ai_conversation_messages:
- table: ai_conversation_threads
column: thread_id
on_delete: async_delete
analyzer_namespace_statuses:
- table: namespaces
column: namespace_id
on_delete: async_delete
analyzer_project_statuses:
- table: projects
column: project_id
on_delete: async_delete
- table: p_ci_builds
column: build_id
on_delete: async_nullify
application_settings:
- table: push_rules
column: push_rule_id
on_delete: async_nullify
- table: users
column: usage_stats_set_by_user_id
on_delete: async_nullify
- table: projects
column: file_template_project_id
on_delete: async_nullify
- table: namespaces
column: custom_project_templates_group_id
on_delete: async_nullify
approval_merge_request_rules:
- table: approval_policy_rules
column: approval_policy_rule_id
on_delete: async_nullify
chat_names:
- table: users
column: user_id
on_delete: async_delete
ci_build_needs:
- table: projects
column: project_id
on_delete: async_delete
ci_build_report_results:
- table: projects
column: project_id
on_delete: async_delete
ci_daily_build_group_report_results:
- table: namespaces
column: group_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
ci_freeze_periods:
- table: projects
column: project_id
on_delete: async_delete
ci_group_variables:
- table: namespaces
column: group_id
on_delete: async_delete
ci_instance_runner_monthly_usages:
- table: namespaces
column: root_namespace_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_nullify
- table: ci_runners
column: runner_id
on_delete: async_nullify
ci_job_token_authorizations:
- table: projects
column: origin_project_id
on_delete: async_delete
- table: projects
column: accessed_project_id
on_delete: async_delete
ci_job_token_group_scope_links:
- table: users
column: added_by_id
on_delete: async_nullify
- table: namespaces
column: target_group_id
on_delete: async_delete
- table: projects
column: source_project_id
on_delete: async_delete
ci_job_token_project_scope_links:
- table: users
column: added_by_id
on_delete: async_nullify
- table: projects
column: source_project_id
on_delete: async_delete
- table: projects
column: target_project_id
on_delete: async_delete
ci_job_variables:
- table: projects
column: project_id
on_delete: async_delete
ci_minutes_additional_packs:
- table: namespaces
column: namespace_id
on_delete: async_delete
ci_namespace_mirrors:
- table: namespaces
column: namespace_id
on_delete: async_delete
ci_pending_builds:
- table: namespaces
column: namespace_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
- table: plans
column: plan_id
on_delete: async_delete
ci_pipeline_artifacts:
- table: projects
column: project_id
on_delete: async_delete
ci_pipeline_chat_data:
- table: chat_names
column: chat_name_id
on_delete: async_delete
ci_pipeline_metadata:
- table: projects
column: project_id
on_delete: async_delete
ci_pipeline_schedule_inputs:
- table: projects
column: project_id
on_delete: async_delete
ci_pipeline_schedules:
- table: users
column: owner_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
ci_project_mirrors:
- table: projects
column: project_id
on_delete: async_delete
- table: namespaces
column: namespace_id
on_delete: async_delete
ci_project_monthly_usages:
- table: projects
column: project_id
on_delete: async_delete
ci_refs:
- table: projects
column: project_id
on_delete: async_delete
ci_resource_groups:
- table: projects
column: project_id
on_delete: async_delete
ci_runner_namespaces:
- table: namespaces
column: namespace_id
on_delete: async_delete
ci_runner_projects:
- table: projects
column: project_id
on_delete: async_delete
ci_runner_taggings:
- table: tags
column: tag_id
on_delete: async_delete
ci_runner_taggings_group_type:
- table: namespaces
column: sharding_key_id
on_delete: async_delete
ci_runner_taggings_project_type:
- table: projects
column: sharding_key_id
on_delete: async_delete
ci_runners:
- table: users
column: creator_id
on_delete: async_nullify
- table: organizations
column: organization_id
on_delete: async_delete
ci_running_builds:
- table: projects
column: project_id
on_delete: async_delete
- table: ci_runners
column: runner_id
on_delete: async_delete
ci_secure_files:
- table: projects
column: project_id
on_delete: async_delete
ci_sources_pipelines:
- table: projects
column: source_project_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
ci_sources_projects:
- table: projects
column: source_project_id
on_delete: async_delete
ci_subscriptions_projects:
- table: projects
column: downstream_project_id
on_delete: async_delete
- table: projects
column: upstream_project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_delete
ci_triggers:
- table: users
column: owner_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
ci_unit_tests:
- table: projects
column: project_id
on_delete: async_delete
ci_variables:
- table: projects
column: project_id
on_delete: async_delete
clusters_managed_resources:
- table: p_ci_builds
column: build_id
on_delete: async_delete
country_access_logs:
- table: users
column: user_id
on_delete: async_delete
dast_pre_scan_verification_steps:
- table: projects
column: project_id
on_delete: async_delete
dast_pre_scan_verifications:
- table: p_ci_pipelines
column: ci_pipeline_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
dast_profile_schedules:
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_nullify
dast_profiles:
- table: projects
column: project_id
on_delete: async_delete
dast_profiles_pipelines:
- table: p_ci_pipelines
column: ci_pipeline_id
on_delete: async_delete
dast_profiles_tags:
- table: tags
column: tag_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
dast_scanner_profiles:
- table: projects
column: project_id
on_delete: async_delete
dast_scanner_profiles_builds:
- table: p_ci_builds
column: ci_build_id
on_delete: async_delete
dast_site_profile_secret_variables:
- table: projects
column: project_id
on_delete: async_delete
dast_site_profiles:
- table: projects
column: project_id
on_delete: async_delete
dast_site_profiles_builds:
- table: p_ci_builds
column: ci_build_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
dast_site_tokens:
- table: projects
column: project_id
on_delete: async_delete
dast_site_validations:
- table: projects
column: project_id
on_delete: async_delete
dast_sites:
- table: projects
column: project_id
on_delete: async_delete
dependency_list_export_parts:
- table: organizations
column: organization_id
on_delete: async_delete
dependency_list_exports:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
- table: namespaces
column: group_id
on_delete: async_delete
- table: organizations
column: organization_id
on_delete: async_delete
deployment_approvals:
- table: p_ci_builds
column: ci_build_id
on_delete: async_delete
deployment_clusters:
- table: clusters
column: cluster_id
on_delete: async_delete
duo_workflows_workloads:
- table: p_ci_workloads
column: workload_id
on_delete: async_delete
events:
- table: users
column: author_id
on_delete: async_delete
external_pull_requests:
- table: projects
column: project_id
on_delete: async_delete
fork_networks:
- table: organizations
column: organization_id
on_delete: async_delete
geo_node_namespace_links:
- table: namespaces
column: namespace_id
on_delete: async_delete
group_push_rules:
- table: namespaces
column: group_id
on_delete: async_delete
group_security_exclusions:
- table: namespaces
column: group_id
on_delete: async_delete
group_wiki_repositories:
- table: namespaces
column: group_id
on_delete: async_delete
group_wiki_repository_states:
- table: namespaces
column: group_id
on_delete: async_delete
groups_visits:
- table: namespaces
column: entity_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_delete
lfs_object_states:
- table: lfs_objects
column: lfs_object_id
on_delete: async_delete
member_approvals:
- table: users
column: requested_by_id
on_delete: async_nullify
- table: users
column: reviewed_by_id
on_delete: async_nullify
- table: users
column: user_id
on_delete: async_delete
members:
- table: users
column: user_id
on_delete: async_delete
merge_request_metrics:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
merge_request_requested_changes:
- table: merge_requests
column: merge_request_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_delete
merge_requests:
- table: p_ci_pipelines
column: head_pipeline_id
on_delete: async_nullify
merge_trains:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
ml_candidates:
- table: p_ci_builds
column: ci_build_id
on_delete: async_nullify
namespace_details:
- table: users
column: creator_id
on_delete: async_nullify
notes:
- table: vulnerabilities
column: noteable_id
conditions:
- column: noteable_type
value: Vulnerability
on_delete: async_delete
notification_settings:
- table: users
column: user_id
on_delete: async_delete
organization_users:
- table: organizations
column: organization_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_delete
p_ai_active_context_code_enabled_namespaces:
- table: ai_active_context_connections
column: connection_id
on_delete: async_delete
p_ai_active_context_code_repositories:
- table: projects
column: project_id
on_delete: update_column_to
target_column: state
target_value: 240
- table: p_ai_active_context_code_enabled_namespaces
column: enabled_namespace_id
on_delete: async_nullify
p_ci_build_names:
- table: projects
column: project_id
on_delete: async_delete
p_ci_build_sources:
- table: projects
column: project_id
on_delete: async_delete
p_ci_build_tags:
- table: projects
column: project_id
on_delete: async_delete
p_ci_builds:
- table: users
column: user_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
- table: ci_runners
column: runner_id
on_delete: async_nullify
p_ci_builds_execution_configs:
- table: projects
column: project_id
on_delete: async_delete
p_ci_builds_metadata:
- table: projects
column: project_id
on_delete: async_delete
p_ci_finished_build_ch_sync_events:
- table: projects
column: project_id
on_delete: async_delete
p_ci_finished_pipeline_ch_sync_events:
- table: namespaces
column: project_namespace_id
on_delete: async_delete
p_ci_job_artifact_reports:
- table: projects
column: project_id
on_delete: async_delete
p_ci_job_artifacts:
- table: projects
column: project_id
on_delete: async_delete
p_ci_job_inputs:
- table: projects
column: project_id
on_delete: async_delete
p_ci_pipelines:
- table: merge_requests
column: merge_request_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
- table: ci_triggers
column: trigger_id
on_delete: async_nullify
delete_limit: 50
p_ci_runner_machine_builds:
- table: ci_runner_machines
column: runner_machine_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
p_ci_stages:
- table: projects
column: project_id
on_delete: async_delete
p_ci_workloads:
- table: projects
column: project_id
on_delete: async_delete
p_knowledge_graph_replicas:
- table: p_knowledge_graph_enabled_namespaces
column: knowledge_graph_enabled_namespace_id
on_delete: async_nullify
packages_build_infos:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
packages_helm_metadata_caches:
- table: projects
column: project_id
on_delete: update_column_to
target_column: status
target_value: 2
packages_npm_metadata_caches:
- table: projects
column: project_id
on_delete: update_column_to
target_column: status
target_value: 2
packages_package_file_build_infos:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
pages_deployments:
- table: p_ci_builds
column: ci_build_id
on_delete: async_nullify
pool_repositories:
- table: projects
column: source_project_id
on_delete: async_nullify
project_authorizations:
- table: users
column: user_id
on_delete: async_delete
project_authorizations_for_migration:
- table: users
column: user_id
on_delete: async_delete
project_repositories:
- table: projects
column: project_id
on_delete: async_delete
project_security_exclusions:
- table: projects
column: project_id
on_delete: async_delete
project_security_statistics:
- table: projects
column: project_id
on_delete: async_delete
project_states:
- table: projects
column: project_id
on_delete: async_delete
projects:
- table: users
column: marked_for_deletion_by_user_id
on_delete: async_nullify
- table: users
column: creator_id
on_delete: async_nullify
- table: pool_repositories
column: pool_repository_id
on_delete: async_nullify
projects_visits:
- table: projects
column: entity_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_delete
projects_with_pipeline_variables:
- table: projects
column: project_id
on_delete: async_delete
push_rules:
- table: organizations
column: organization_id
on_delete: async_delete
requirements_management_test_reports:
- table: p_ci_builds
column: build_id
on_delete: async_nullify
sbom_component_versions:
- table: organizations
column: organization_id
on_delete: async_delete
sbom_components:
- table: organizations
column: organization_id
on_delete: async_delete
sbom_graph_paths:
- table: projects
column: project_id
on_delete: async_delete
sbom_occurrences:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
sbom_occurrences_vulnerabilities:
- table: projects
column: project_id
on_delete: async_delete
sbom_source_packages:
- table: organizations
column: organization_id
on_delete: async_delete
sbom_sources:
- table: organizations
column: organization_id
on_delete: async_delete
security_categories:
- table: namespaces
column: namespace_id
on_delete: async_delete
security_scans:
- table: p_ci_builds
column: build_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
security_trainings:
- table: projects
column: project_id
on_delete: async_delete
sent_notifications_7abbf02cb6:
- table: namespaces
column: namespace_id
on_delete: async_delete
snippets:
- table: organizations
column: organization_id
on_delete: async_delete
terraform_state_version_states:
- table: projects
column: project_id
on_delete: async_delete
- table: terraform_state_versions
column: terraform_state_version_id
on_delete: async_delete
terraform_state_versions:
- table: p_ci_builds
column: ci_build_id
on_delete: async_nullify
user_details:
- table: namespaces
column: provisioned_by_group_id
on_delete: async_nullify
- table: namespaces
column: enterprise_group_id
on_delete: async_nullify
virtual_registries_packages_maven_cache_entries:
- table: virtual_registries_packages_maven_upstreams
column: upstream_id
on_delete: update_column_to
target_column: status
target_value: 2
vulnerabilities:
- table: users
column: dismissed_by_id
on_delete: async_nullify
- table: users
column: resolved_by_id
on_delete: async_nullify
- table: users
column: confirmed_by_id
on_delete: async_nullify
- table: users
column: author_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
vulnerability_archive_exports:
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_delete
vulnerability_archived_records:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_archives:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_export_parts:
- table: organizations
column: organization_id
on_delete: async_delete
vulnerability_exports:
- table: organizations
column: organization_id
on_delete: async_delete
- table: namespaces
column: group_id
on_delete: async_delete
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_delete
vulnerability_external_issue_links:
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_delete
vulnerability_feedback:
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
- table: merge_requests
column: merge_request_id
on_delete: async_nullify
- table: users
column: comment_author_id
on_delete: async_nullify
- table: users
column: author_id
on_delete: async_delete
- table: issues
column: issue_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
vulnerability_finding_evidences:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_finding_signatures:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_findings_remediations:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_flags:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_historical_statistics:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_identifiers:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_issue_links:
- table: projects
column: project_id
on_delete: async_delete
- table: issues
column: issue_id
on_delete: async_delete
vulnerability_merge_request_links:
- table: projects
column: project_id
on_delete: async_delete
- table: merge_requests
column: merge_request_id
on_delete: async_delete
vulnerability_namespace_historical_statistics:
- table: namespaces
column: namespace_id
on_delete: async_delete
vulnerability_namespace_statistics:
- table: namespaces
column: namespace_id
on_delete: async_delete
vulnerability_occurrences:
- table: p_ci_pipelines
column: initial_pipeline_id
on_delete: async_nullify
- table: p_ci_pipelines
column: latest_pipeline_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
vulnerability_partial_scans:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_reads:
- table: cluster_agents
column: casted_cluster_agent_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
vulnerability_remediations:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_representation_information:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_scanners:
- table: projects
column: project_id
on_delete: async_delete
vulnerability_severity_overrides:
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_nullify
vulnerability_state_transitions:
- table: projects
column: project_id
on_delete: async_delete
- table: users
column: author_id
on_delete: async_nullify
vulnerability_statistics:
- table: p_ci_pipelines
column: latest_pipeline_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
vulnerability_user_mentions:
- table: projects
column: project_id
on_delete: async_delete
- table: notes
column: note_id
on_delete: async_delete