12 Foreign Key Constraints
Constraint Name | Child Column | Parent Column | Delete Rule | ||
---|---|---|---|---|---|
prison_configuration_audit_rev_id_fkey |
|
|
Restrict delete | ||
allocation_audit_rev_id_fkey |
|
|
Restrict delete | ||
key_worker_status_id_fkey |
|
|
Restrict delete | ||
staff_configuration_policy_code_fkey |
|
|
Restrict delete | ||
allocation_policy_code_fkey |
|
|
Restrict delete | ||
allocation_allocation_reason_id_fkey |
|
|
Restrict delete | ||
allocation_deallocation_reason_id_fkey |
|
|
Restrict delete | ||
prison_configuration_policy_code_fkey |
|
|
Restrict delete | ||
staff_configuration_audit_rev_id_fkey |
|
|
Restrict delete | ||
staff_role_audit_rev_id_fkey |
|
|
Restrict delete | ||
offender_key_worker_allocation_reason_id_fkey |
|
|
Restrict delete | ||
offender_key_worker_deallocation_reason_id_fkey |
|
|
Restrict delete |
Check Constraints
Table | Constraint Name | Constraint |
---|---|---|
allocation | allocation_allocation_type | ((allocation_type = ANY (ARRAY['A'::bpchar, 'M'::bpchar, 'P'::bpchar]))) |
allocation | ch_allocation_is_active | ((NOT ((is_active = true) AND ((deallocated_at IS NOT NULL) OR (deallocated_by IS NOT NULL) OR (deallocation_reason_id IS NOT NULL))))) |
allocation | ch_allocation_is_not_active | ((NOT ((is_active = false) AND ((deallocated_at IS NULL) OR (deallocated_by IS NULL) OR (deallocation_reason_id IS NULL))))) |
zz_archived_legacy_keyworker_allocation | offender_key_worker_c1 | ((alloc_type = ANY (ARRAY['A'::bpchar, 'M'::bpchar, 'P'::bpchar]))) |