Constraints

191 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
project_information_data_updated_by_fkey
project_information_data.updated_by
ccbc_user.id
Restrict delete
project_information_data_created_by_fkey
project_information_data.created_by
ccbc_user.id
Restrict delete
project_information_data_archived_by_fkey
project_information_data.archived_by
ccbc_user.id
Restrict delete
project_information_data_application_id_fkey
project_information_data.application_id
application.id
Restrict delete
email_record_updated_by_fkey
email_record.updated_by
ccbc_user.id
Restrict delete
email_record_archived_by_fkey
email_record.archived_by
ccbc_user.id
Restrict delete
email_record_created_by_fkey
email_record.created_by
ccbc_user.id
Restrict delete
assessment_data_assessment_data_type_fkey
assessment_data.assessment_data_type
assessment_type.name
Restrict delete
assessment_data_created_by_fkey
assessment_data.created_by
ccbc_user.id
Restrict delete
assessment_data_application_id_fkey
assessment_data.application_id
application.id
Restrict delete
assessment_data_updated_by_fkey
assessment_data.updated_by
ccbc_user.id
Restrict delete
assessment_data_archived_by_fkey
assessment_data.archived_by
ccbc_user.id
Restrict delete
application_form_template_9_data_application_id_fkey
application_form_template_9_data.application_id
application.id
Restrict delete
application_form_template_9_data_archived_by_fkey
application_form_template_9_data.archived_by
ccbc_user.id
Restrict delete
application_form_template_9_data_created_by_fkey
application_form_template_9_data.created_by
ccbc_user.id
Restrict delete
application_form_template_9_data_updated_by_fkey
application_form_template_9_data.updated_by
ccbc_user.id
Restrict delete
application_gis_assessment_hh_created_by_fkey
application_gis_assessment_hh.created_by
ccbc_user.id
Restrict delete
application_gis_assessment_hh_updated_by_fkey
application_gis_assessment_hh.updated_by
ccbc_user.id
Restrict delete
application_gis_assessment_hh_application_id_fkey
application_gis_assessment_hh.application_id
application.id
Restrict delete
application_gis_assessment_hh_archived_by_fkey
application_gis_assessment_hh.archived_by
ccbc_user.id
Restrict delete
application_sow_data_application_id_fkey
application_sow_data.application_id
application.id
Restrict delete
application_sow_data_created_by_fkey
application_sow_data.created_by
ccbc_user.id
Restrict delete
application_sow_data_archived_by_fkey
application_sow_data.archived_by
ccbc_user.id
Restrict delete
application_sow_data_updated_by_fkey
application_sow_data.updated_by
ccbc_user.id
Restrict delete
rfi_data_updated_by_fkey
rfi_data.updated_by
ccbc_user.id
Restrict delete
rfi_data_rfi_data_status_type_id_fkey
rfi_data.rfi_data_status_type_id
rfi_data_status_type.name
Restrict delete
rfi_data_created_by_fkey
rfi_data.created_by
ccbc_user.id
Restrict delete
rfi_data_archived_by_fkey
rfi_data.archived_by
ccbc_user.id
Restrict delete
application_form_data_application_id_fkey
application_form_data.application_id
application.id
Restrict delete
application_form_data_form_data_id_fkey
application_form_data.form_data_id
form_data.id
Restrict delete
application_dependencies_archived_by_fkey
application_dependencies.archived_by
ccbc_user.id
Restrict delete
application_dependencies_application_id_fkey
application_dependencies.application_id
application.id
Restrict delete
application_dependencies_updated_by_fkey
application_dependencies.updated_by
ccbc_user.id
Restrict delete
application_dependencies_created_by_fkey
application_dependencies.created_by
ccbc_user.id
Restrict delete
application_claims_excel_data_updated_by_fkey
application_claims_excel_data.updated_by
ccbc_user.id
Restrict delete
application_claims_excel_data_application_id_fkey
application_claims_excel_data.application_id
application.id
Restrict delete
application_claims_excel_data_created_by_fkey
application_claims_excel_data.created_by
ccbc_user.id
Restrict delete
application_claims_excel_data_archived_by_fkey
application_claims_excel_data.archived_by
ccbc_user.id
Restrict delete
analyst_created_by_fkey
analyst.created_by
ccbc_user.id
Restrict delete
analyst_updated_by_fkey
analyst.updated_by
ccbc_user.id
Restrict delete
analyst_archived_by_fkey
analyst.archived_by
ccbc_user.id
Restrict delete
cbc_project_communities_archived_by_fkey
cbc_project_communities.archived_by
ccbc_user.id
Restrict delete
cbc_project_communities_created_by_fkey
cbc_project_communities.created_by
ccbc_user.id
Restrict delete
cbc_project_communities_updated_by_fkey
cbc_project_communities.updated_by
ccbc_user.id
Restrict delete
cbc_project_communities_cbc_id_fkey
cbc_project_communities.cbc_id
cbc.id
Restrict delete
cbc_project_communities_communities_source_data_id_fkey
cbc_project_communities.communities_source_data_id
communities_source_data.geographic_name_id
Restrict delete
intake_archived_by_fkey
intake.archived_by
ccbc_user.id
Restrict delete
intake_updated_by_fkey
intake.updated_by
ccbc_user.id
Restrict delete
intake_created_by_fkey
intake.created_by
ccbc_user.id
Restrict delete
intake_counter_id_fkey
intake.counter_id
gapless_counter.id
Restrict delete
application_pending_change_request_created_by_fkey
application_pending_change_request.created_by
ccbc_user.id
Restrict delete
application_pending_change_request_application_id_fkey
application_pending_change_request.application_id
application.id
Restrict delete
application_pending_change_request_archived_by_fkey
application_pending_change_request.archived_by
ccbc_user.id
Restrict delete
application_pending_change_request_updated_by_fkey
application_pending_change_request.updated_by
ccbc_user.id
Restrict delete
reporting_gcpe_updated_by_fkey
reporting_gcpe.updated_by
ccbc_user.id
Restrict delete
reporting_gcpe_created_by_fkey
reporting_gcpe.created_by
ccbc_user.id
Restrict delete
reporting_gcpe_archived_by_fkey
reporting_gcpe.archived_by
ccbc_user.id
Restrict delete
announcement_updated_by_fkey
announcement.updated_by
ccbc_user.id
Restrict delete
announcement_created_by_fkey
announcement.created_by
ccbc_user.id
Restrict delete
announcement_archived_by_fkey
announcement.archived_by
ccbc_user.id
Restrict delete
application_milestone_excel_data_application_id_fkey
application_milestone_excel_data.application_id
application.id
Restrict delete
application_milestone_excel_data_created_by_fkey
application_milestone_excel_data.created_by
ccbc_user.id
Restrict delete
application_milestone_excel_data_updated_by_fkey
application_milestone_excel_data.updated_by
ccbc_user.id
Restrict delete
application_milestone_excel_data_archived_by_fkey
application_milestone_excel_data.archived_by
ccbc_user.id
Restrict delete
communities_source_data_created_by_fkey
communities_source_data.created_by
ccbc_user.id
Restrict delete
communities_source_data_updated_by_fkey
communities_source_data.updated_by
ccbc_user.id
Restrict delete
communities_source_data_archived_by_fkey
communities_source_data.archived_by
ccbc_user.id
Restrict delete
application_internal_description_created_by_fkey
application_internal_description.created_by
ccbc_user.id
Restrict delete
application_internal_description_updated_by_fkey
application_internal_description.updated_by
ccbc_user.id
Restrict delete
application_internal_description_archived_by_fkey
application_internal_description.archived_by
ccbc_user.id
Restrict delete
application_internal_description_application_id_fkey
application_internal_description.application_id
application.id
Restrict delete
record_version_created_by_fkey
record_version.created_by
ccbc_user.id
Restrict delete
cbc_data_cbc_id_fkey
cbc_data.cbc_id
cbc.id
Restrict delete
cbc_data_archived_by_fkey
cbc_data.archived_by
ccbc_user.id
Restrict delete
cbc_data_created_by_fkey
cbc_data.created_by
ccbc_user.id
Restrict delete
cbc_data_updated_by_fkey
cbc_data.updated_by
ccbc_user.id
Restrict delete
fk_cbc_data
cbc_data.project_number
cbc.project_number
Restrict delete
attachment_created_by_fkey
attachment.created_by
ccbc_user.id
Restrict delete
attachment_application_status_id_fkey
attachment.application_status_id
application_status.id
Restrict delete
attachment_application_id_fkey
attachment.application_id
application.id
Restrict delete
attachment_updated_by_fkey
attachment.updated_by
ccbc_user.id
Restrict delete
attachment_archived_by_fkey
attachment.archived_by
ccbc_user.id
Restrict delete
ccbc_user_archived_by_fkey
ccbc_user.archived_by
ccbc_user.id
Restrict delete
ccbc_user_updated_by_fkey
ccbc_user.updated_by
ccbc_user.id
Restrict delete
ccbc_user_created_by_fkey
ccbc_user.created_by
ccbc_user.id
Restrict delete
cbc_updated_by_fkey
cbc.updated_by
ccbc_user.id
Restrict delete
cbc_created_by_fkey
cbc.created_by
ccbc_user.id
Restrict delete
cbc_archived_by_fkey
cbc.archived_by
ccbc_user.id
Restrict delete
application_archived_by_fkey
application.archived_by
ccbc_user.id
Restrict delete
application_updated_by_fkey
application.updated_by
ccbc_user.id
Restrict delete
application_created_by_fkey
application.created_by
ccbc_user.id
Restrict delete
application_intake_id_fkey
application.intake_id
intake.id
Restrict delete
application_analyst_lead_application_id_fkey
application_analyst_lead.application_id
application.id
Restrict delete
application_analyst_lead_archived_by_fkey
application_analyst_lead.archived_by
ccbc_user.id
Restrict delete
application_analyst_lead_analyst_id_fkey
application_analyst_lead.analyst_id
analyst.id
Restrict delete
application_analyst_lead_updated_by_fkey
application_analyst_lead.updated_by
ccbc_user.id
Restrict delete
application_analyst_lead_created_by_fkey
application_analyst_lead.created_by
ccbc_user.id
Restrict delete
application_milestone_data_application_id_fkey
application_milestone_data.application_id
application.id
Restrict delete
application_milestone_data_updated_by_fkey
application_milestone_data.updated_by
ccbc_user.id
Restrict delete
application_milestone_data_created_by_fkey
application_milestone_data.created_by
ccbc_user.id
Restrict delete
application_milestone_data_archived_by_fkey
application_milestone_data.archived_by
ccbc_user.id
Restrict delete
change_request_data_updated_by_fkey
change_request_data.updated_by
ccbc_user.id
Restrict delete
change_request_data_archived_by_fkey
change_request_data.archived_by
ccbc_user.id
Restrict delete
change_request_data_created_by_fkey
change_request_data.created_by
ccbc_user.id
Restrict delete
change_request_data_application_id_fkey
change_request_data.application_id
application.id
Restrict delete
cbc_data_change_reason_cbc_data_id_fkey
cbc_data_change_reason.cbc_data_id
cbc_data.id
Restrict delete
cbc_data_change_reason_archived_by_fkey
cbc_data_change_reason.archived_by
ccbc_user.id
Restrict delete
cbc_data_change_reason_created_by_fkey
cbc_data_change_reason.created_by
ccbc_user.id
Restrict delete
cbc_data_change_reason_updated_by_fkey
cbc_data_change_reason.updated_by
ccbc_user.id
Restrict delete
conditional_approval_data_updated_by_fkey
conditional_approval_data.updated_by
ccbc_user.id
Restrict delete
conditional_approval_data_created_by_fkey
conditional_approval_data.created_by
ccbc_user.id
Restrict delete
conditional_approval_data_application_id_fkey
conditional_approval_data.application_id
application.id
Restrict delete
conditional_approval_data_archived_by_fkey
conditional_approval_data.archived_by
ccbc_user.id
Restrict delete
application_community_report_excel_data_application_id_fkey
application_community_report_excel_data.application_id
application.id
Restrict delete
application_community_report_excel_data_created_by_fkey
application_community_report_excel_data.created_by
ccbc_user.id
Restrict delete
application_community_report_excel_data_archived_by_fkey
application_community_report_excel_data.archived_by
ccbc_user.id
Restrict delete
application_community_report_excel_data_updated_by_fkey
application_community_report_excel_data.updated_by
ccbc_user.id
Restrict delete
application_announced_updated_by_fkey
application_announced.updated_by
ccbc_user.id
Restrict delete
application_announced_created_by_fkey
application_announced.created_by
ccbc_user.id
Restrict delete
application_announced_archived_by_fkey
application_announced.archived_by
ccbc_user.id
Restrict delete
application_announced_application_id_fkey
application_announced.application_id
application.id
Restrict delete
cbc_project_updated_by_fkey
cbc_project.updated_by
ccbc_user.id
Restrict delete
cbc_project_created_by_fkey
cbc_project.created_by
ccbc_user.id
Restrict delete
cbc_project_archived_by_fkey
cbc_project.archived_by
ccbc_user.id
Restrict delete
application_gis_data_created_by_fkey
application_gis_data.created_by
ccbc_user.id
Restrict delete
application_gis_data_updated_by_fkey
application_gis_data.updated_by
ccbc_user.id
Restrict delete
application_gis_data_application_id_fkey
application_gis_data.application_id
application.id
Restrict delete
application_gis_data_archived_by_fkey
application_gis_data.archived_by
ccbc_user.id
Restrict delete
application_gis_data_batch_id_fkey
application_gis_data.batch_id
gis_data.id
Restrict delete
sow_tab_2_updated_by_fkey
sow_tab_2.updated_by
ccbc_user.id
Restrict delete
sow_tab_2_sow_id_fkey
sow_tab_2.sow_id
application_sow_data.id
Restrict delete
sow_tab_2_created_by_fkey
sow_tab_2.created_by
ccbc_user.id
Restrict delete
sow_tab_2_archived_by_fkey
sow_tab_2.archived_by
ccbc_user.id
Restrict delete
application_status_status_fkey
application_status.status
application_status_type.name
Restrict delete
application_status_updated_by_fkey
application_status.updated_by
ccbc_user.id
Restrict delete
application_status_created_by_fkey
application_status.created_by
ccbc_user.id
Restrict delete
application_status_archived_by_fkey
application_status.archived_by
ccbc_user.id
Restrict delete
application_status_application_id_fkey
application_status.application_id
application.id
Restrict delete
application_announcement_application_id_fkey
application_announcement.application_id
application.id
Restrict delete
application_announcement_announcement_id_fkey
application_announcement.announcement_id
announcement.id
Restrict delete
application_announcement_updated_by_fkey
application_announcement.updated_by
ccbc_user.id
Restrict delete
application_announcement_archived_by_fkey
application_announcement.archived_by
ccbc_user.id
Restrict delete
application_announcement_created_by_fkey
application_announcement.created_by
ccbc_user.id
Restrict delete
form_form_type_fkey
form.form_type
form_type.name
Restrict delete
sow_tab_1_created_by_fkey
sow_tab_1.created_by
ccbc_user.id
Restrict delete
sow_tab_1_updated_by_fkey
sow_tab_1.updated_by
ccbc_user.id
Restrict delete
sow_tab_1_sow_id_fkey
sow_tab_1.sow_id
application_sow_data.id
Restrict delete
sow_tab_1_archived_by_fkey
sow_tab_1.archived_by
ccbc_user.id
Restrict delete
cbc_application_pending_change_request_created_by_fkey
cbc_application_pending_change_request.created_by
ccbc_user.id
Restrict delete
cbc_application_pending_change_request_cbc_id_fkey
cbc_application_pending_change_request.cbc_id
cbc.id
Restrict delete
cbc_application_pending_change_request_archived_by_fkey
cbc_application_pending_change_request.archived_by
ccbc_user.id
Restrict delete
cbc_application_pending_change_request_updated_by_fkey
cbc_application_pending_change_request.updated_by
ccbc_user.id
Restrict delete
application_rfi_data_rfi_data_id_fkey
application_rfi_data.rfi_data_id
rfi_data.id
Restrict delete
application_rfi_data_application_id_fkey
application_rfi_data.application_id
application.id
Restrict delete
sow_tab_7_created_by_fkey
sow_tab_7.created_by
ccbc_user.id
Restrict delete
sow_tab_7_archived_by_fkey
sow_tab_7.archived_by
ccbc_user.id
Restrict delete
sow_tab_7_updated_by_fkey
sow_tab_7.updated_by
ccbc_user.id
Restrict delete
sow_tab_7_sow_id_fkey
sow_tab_7.sow_id
application_sow_data.id
Restrict delete
application_project_type_archived_by_fkey
application_project_type.archived_by
ccbc_user.id
Restrict delete
application_project_type_updated_by_fkey
application_project_type.updated_by
ccbc_user.id
Restrict delete
application_project_type_created_by_fkey
application_project_type.created_by
ccbc_user.id
Restrict delete
application_project_type_application_id_fkey
application_project_type.application_id
application.id
Restrict delete
application_community_progress_report_data_updated_by_fkey
application_community_progress_report_data.updated_by
ccbc_user.id
Restrict delete
application_community_progress_report_data_created_by_fkey
application_community_progress_report_data.created_by
ccbc_user.id
Restrict delete
application_community_progress_report_data_archived_by_fkey
application_community_progress_report_data.archived_by
ccbc_user.id
Restrict delete
application_community_progress_report_data_application_id_fkey
application_community_progress_report_data.application_id
application.id
Restrict delete
gis_data_updated_by_fkey
gis_data.updated_by
ccbc_user.id
Restrict delete
gis_data_archived_by_fkey
gis_data.archived_by
ccbc_user.id
Restrict delete
gis_data_created_by_fkey
gis_data.created_by
ccbc_user.id
Restrict delete
sow_tab_8_archived_by_fkey
sow_tab_8.archived_by
ccbc_user.id
Restrict delete
sow_tab_8_updated_by_fkey
sow_tab_8.updated_by
ccbc_user.id
Restrict delete
sow_tab_8_created_by_fkey
sow_tab_8.created_by
ccbc_user.id
Restrict delete
sow_tab_8_sow_id_fkey
sow_tab_8.sow_id
application_sow_data.id
Restrict delete
application_claims_data_created_by_fkey
application_claims_data.created_by
ccbc_user.id
Restrict delete
application_claims_data_updated_by_fkey
application_claims_data.updated_by
ccbc_user.id
Restrict delete
application_claims_data_archived_by_fkey
application_claims_data.archived_by
ccbc_user.id
Restrict delete
application_claims_data_application_id_fkey
application_claims_data.application_id
application.id
Restrict delete
notification_created_by_fkey
notification.created_by
ccbc_user.id
Restrict delete
notification_application_id_fkey
notification.application_id
application.id
Restrict delete
notification_archived_by_fkey
notification.archived_by
ccbc_user.id
Restrict delete
notification_email_record_id_fkey
notification.email_record_id
email_record.id
Restrict delete
notification_updated_by_fkey
notification.updated_by
ccbc_user.id
Restrict delete
application_package_archived_by_fkey
application_package.archived_by
ccbc_user.id
Restrict delete
application_package_application_id_fkey
application_package.application_id
application.id
Restrict delete
application_package_created_by_fkey
application_package.created_by
ccbc_user.id
Restrict delete
application_package_updated_by_fkey
application_package.updated_by
ccbc_user.id
Restrict delete
form_data_form_schema_id_fkey
form_data.form_schema_id
form.id
Restrict delete
form_data_archived_by_fkey
form_data.archived_by
ccbc_user.id
Restrict delete
form_data_updated_by_fkey
form_data.updated_by
ccbc_user.id
Restrict delete
form_data_created_by_fkey
form_data.created_by
ccbc_user.id
Restrict delete
form_data_form_data_status_type_id_fkey
form_data.form_data_status_type_id
form_data_status_type.name
Restrict delete

Check Constraints

Table Constraint Name Constraint
application_status_type no_invisible_status ((visible_by_analyst OR visible_by_applicant))
record_version record_version_check (((COALESCE(record_id, old_record_id) IS NOT NULL) OR (op = 'TRUNCATE'::audit.operation)))
record_version record_version_check1 (((op = ANY (ARRAY['INSERT'::audit.operation, 'UPDATE'::audit.operation])) = (record_id IS NOT NULL)))
record_version record_version_check2 (((op = ANY (ARRAY['INSERT'::audit.operation, 'UPDATE'::audit.operation])) = (record IS NOT NULL)))
record_version record_version_check3 (((op = ANY (ARRAY['UPDATE'::audit.operation, 'DELETE'::audit.operation])) = (old_record_id IS NOT NULL)))
record_version record_version_check4 (((op = ANY (ARRAY['UPDATE'::audit.operation, 'DELETE'::audit.operation])) = (old_record IS NOT NULL)))
application_project_type application_project_type_project_type_check ((((project_type)::text = ANY ((ARRAY['lastMile'::character varying, 'lastMileAndTransport'::character varying, 'transport'::character varying])::text[])) OR (project_type IS NULL)))
application_package application_package_package_check ((package > 0))