Constraints

40 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
FK_violation_code_agency_code
violation_code.agency_code
agency_code.agency_code
Restrict delete
FK_geoorgutnd_gorgtypecd
geo_organization_unit_code.geo_org_unit_type_code
geo_org_unit_type_code.geo_org_unit_type_code
Restrict delete
FK_gorgustrct_agencycode
geo_org_unit_structure.agency_code
agency_code.agency_code
Restrict delete
FK_gorgustrct_parent_geoorgutcd
geo_org_unit_structure.parent_geo_org_unit_code
geo_organization_unit_code.geo_organization_unit_code
Restrict delete
FK_gorgustrct_child_geoorgutcd
geo_org_unit_structure.child_geo_org_unit_code
geo_organization_unit_code.geo_organization_unit_code
Restrict delete
staging_staging_metadata_mapping_entity_code
staging_metadata_mapping.entity_code
entity_code.entity_code
Restrict delete
FK_algtncmplt_violatncd
allegation_complaint.violation_code
violation_code.violation_code
Restrict delete
FK_algtncmplt_complaint
allegation_complaint.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_hwcrcmplnt_speciescd
hwcr_complaint.species_code
species_code.species_code
Restrict delete
FK_hwcrcmplnt_complaint
hwcr_complaint.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_hwcrcmplnt_cmpltntrcd
hwcr_complaint.hwcr_complaint_nature_code
hwcr_complaint_nature_code.hwcr_complaint_nature_code
Restrict delete
FK_featurecd
feature_agency_xref.feature_code
feature_code.feature_code
Restrict delete
FK_agencycode
feature_agency_xref.agency_code
agency_code.agency_code
Restrict delete
staging_complaint_staging_status_code
staging_complaint.staging_status_code
staging_status_code.staging_status_code
Restrict delete
staging_complaint_staging_staging_activity_code
staging_complaint.staging_activity_code
staging_activity_code.staging_activity_code
Restrict delete
FK_person_complaint_xref__person_guid
person_complaint_xref.person_guid
person.person_guid
Restrict delete
FK_person_complaint_xref__complaint_identifier
person_complaint_xref.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_person_complaint_xref__person_complaint_xref_code
person_complaint_xref.person_complaint_xref_code
person_complaint_xref_code.person_complaint_xref_code
Restrict delete
FK_gircmplnt_complaint
gir_complaint.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_gircmplnt_cmpltgircd
gir_complaint.gir_type_code
gir_type_code.gir_type_code
Restrict delete
officer_team_xref_officer_fk
officer_team_xref.officer_guid
officer.officer_guid
Restrict delete
officer_team_xref_team_fk
officer_team_xref.team_guid
team.team_guid
Restrict delete
FK_attrhwcrx_atractntcd
attractant_hwcr_xref.attractant_code
attractant_code.attractant_code
Restrict delete
FK_attrhwcrx_hwcrcmplnt
attractant_hwcr_xref.hwcr_complaint_guid
hwcr_complaint.hwcr_complaint_guid
Restrict delete
FK_complaint_type_code_agency_code
complaint_type_code.agency_code
agency_code.agency_code
Restrict delete
FK_comp_mthd_recv_cd_agcy_cd_xref_complaint_method_received_cod
comp_mthd_recv_cd_agcy_cd_xref.complaint_method_received_code
complaint_method_received_code.complaint_method_received_code
Restrict delete
FK_comp_mthd_recv_cd_agcy_cd_xref_agencycode
comp_mthd_recv_cd_agcy_cd_xref.agency_code
agency_code.agency_code
Restrict delete
FK_lnkcmplxref_complaint
linked_complaint_xref.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_lnkcmplxref_linked_complaint
linked_complaint_xref.linked_complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_officer_office
officer.office_guid
office.office_guid
Restrict delete
FK_officer_person
officer.person_guid
person.person_guid
Restrict delete
complaint_update_fk
complaint_update.complaint_identifier
complaint.complaint_identifier
Restrict delete
FK_office_geoorgutnd
office.geo_organization_unit_code
geo_organization_unit_code.geo_organization_unit_code
Restrict delete
team_team_code_fk
team.team_code
team_code.team_code
Restrict delete
team_agency_code_fk
team.agency_code
agency_code.agency_code
Restrict delete
FK_complaint_reported_by_code
complaint.reported_by_code
reported_by_code.reported_by_code
Restrict delete
FK_complaint_geoorgutnd
complaint.geo_organization_unit_code
geo_organization_unit_code.geo_organization_unit_code
Restrict delete
FK_complaint_owned_by_agencycode
complaint.owned_by_agency_code
agency_code.agency_code
Restrict delete
complaint_comp_mthd_recv_cd_agcy_cd_xref_fk
complaint.comp_mthd_recv_cd_agcy_cd_xref_guid
comp_mthd_recv_cd_agcy_cd_xref.comp_mthd_recv_cd_agcy_cd_xref_guid
Restrict delete
FK_complaint_compntstscd
complaint.complaint_status_code
complaint_status_code.complaint_status_code
Restrict delete

Check Constraints

Table Constraint Name Constraint
spatial_ref_sys spatial_ref_sys_srid_check (((srid > 0) AND (srid <= 998999)))
action_taken action_taken_check (((complaint_identifier IS NOT NULL) OR (complaint_update_guid IS NOT NULL)))
linked_complaint_xref NE_lnkcmplxref_no_self_link (((complaint_identifier)::text <> (linked_complaint_identifier)::text))
complaint complaint_is_privacy_requested ((is_privacy_requested = ANY (ARRAY['Y'::bpchar, 'N'::bpchar, 'U'::bpchar])))