104 Foreign Key Constraints
Constraint Name | Child Column | Parent Column | Delete Rule | ||
---|---|---|---|---|---|
notification_types_notification_criticality_id_fkey |
|
|
Restrict delete | ||
species_wood_density_level_id_fkey |
|
|
Restrict delete | ||
species_organization_id_fkey |
|
|
Cascade on delete | ||
species_deleted_by_fkey |
|
|
Restrict delete | ||
species_created_by_fkey |
|
|
Restrict delete | ||
species_conservation_category_id_fkey |
|
|
Restrict delete | ||
species_seed_storage_behavior_id_fkey |
|
|
Restrict delete | ||
species_modified_by_fkey |
|
|
Restrict delete | ||
organization_report_settings_organization_id_fkey |
|
|
Cascade on delete | ||
project_report_settings_project_id_fkey |
|
|
Cascade on delete | ||
project_land_use_model_types_land_use_model_type_id_fkey |
|
|
Restrict delete | ||
project_land_use_model_types_project_id_fkey |
|
|
Cascade on delete | ||
organizations_time_zone_fkey |
|
|
Null on delete | ||
organizations_organization_type_id_fkey |
|
|
Restrict delete | ||
organizations_created_by_fkey |
|
|
Restrict delete | ||
organizations_country_code_fkey |
|
|
Restrict delete | ||
organizations_country_subdivision_code_fkey |
|
|
Restrict delete | ||
organizations_modified_by_fkey |
|
|
Restrict delete | ||
reports_status_id_fkey |
|
|
Restrict delete | ||
reports_organization_id_fkey |
|
|
Restrict delete | ||
reports_project_id_fkey |
|
|
Null on delete | ||
reports_locked_by_fkey |
|
|
Restrict delete | ||
reports_submitted_by_fkey |
|
|
Restrict delete | ||
reports_modified_by_fkey |
|
|
Restrict delete | ||
identifier_sequences_organization_id_fkey |
|
|
Restrict delete | ||
species_successional_groups_species_id_fkey |
|
|
Cascade on delete | ||
species_successional_groups_successional_group_id_fkey |
|
|
Restrict delete | ||
countries_region_id_fkey |
|
|
Restrict delete | ||
species_growth_forms_growth_form_id_fkey |
|
|
Restrict delete | ||
species_growth_forms_species_id_fkey |
|
|
Cascade on delete | ||
device_templates_category_id_fkey |
|
|
Restrict delete | ||
photos_modified_by_fkey |
|
|
Restrict delete | ||
photos_user_id_fkey |
|
|
Restrict delete | ||
storage_locations_facility_id_fkey |
|
|
Cascade on delete | ||
storage_locations_modified_by_fkey |
|
|
Restrict delete | ||
storage_locations_created_by_fkey |
|
|
Restrict delete | ||
report_photos_report_id_fkey |
|
|
Restrict delete | ||
report_photos_photo_id_fkey |
|
|
Cascade on delete | ||
country_subdivisions_country_code_fkey |
|
|
Restrict delete | ||
user_global_roles_global_role_id_fkey |
|
|
Cascade on delete | ||
user_global_roles_user_id_fkey |
|
|
Cascade on delete | ||
upload_problems_type_id_fkey |
|
|
Restrict delete | ||
upload_problems_upload_id_fkey |
|
|
Cascade on delete | ||
internal_tags_modified_by_fkey |
|
|
Restrict delete | ||
internal_tags_created_by_fkey |
|
|
Restrict delete | ||
species_plant_material_sourci_plant_material_sourcing_meth_fkey |
|
|
Restrict delete | ||
species_plant_material_sourcing_methods_species_id_fkey |
|
|
Cascade on delete | ||
uploads_facility_id_fkey |
|
|
Restrict delete | ||
uploads_status_id_fkey |
|
|
Restrict delete | ||
uploads_organization_id_fkey |
|
|
Restrict delete | ||
uploads_type_id_fkey |
|
|
Restrict delete | ||
uploads_created_by_fkey |
|
|
Restrict delete | ||
timeseries_values_timeseries_id_fkey |
|
|
Cascade on delete | ||
users_country_code_fkey |
|
|
Restrict delete | ||
users_user_type_id_fkey |
|
|
Restrict delete | ||
users_time_zone_fkey |
|
|
Null on delete | ||
organization_internal_tags_created_by_fkey |
|
|
Restrict delete | ||
organization_internal_tags_organization_id_fkey |
|
|
Cascade on delete | ||
organization_internal_tags_internal_tag_id_fkey |
|
|
Cascade on delete | ||
organization_managed_location_types_organization_id_fkey |
|
|
Cascade on delete | ||
organization_managed_location_typ_managed_location_type_id_fkey |
|
|
Restrict delete | ||
user_preferences_user_id_fkey |
|
|
Restrict delete | ||
user_preferences_organization_id_fkey |
|
|
Cascade on delete | ||
automations_created_by_fkey |
|
|
Restrict delete | ||
automations_modified_by_fkey |
|
|
Restrict delete | ||
automations_device_id_fkey |
|
|
Cascade on delete | ||
automations_facility_id_fkey |
|
|
Cascade on delete | ||
species_problems_type_id_fkey |
|
|
Restrict delete | ||
species_problems_species_id_fkey |
|
|
Cascade on delete | ||
species_problems_field_id_fkey |
|
|
Restrict delete | ||
notifications_organization_id_fkey |
|
|
Cascade on delete | ||
notifications_notification_type_id_fkey |
|
|
Restrict delete | ||
notifications_user_id_fkey |
|
|
Restrict delete | ||
organization_users_organization_id_fkey |
|
|
Cascade on delete | ||
organization_users_modified_by_fkey |
|
|
Restrict delete | ||
organization_users_created_by_fkey |
|
|
Restrict delete | ||
organization_users_user_id_fkey |
|
|
Restrict delete | ||
organization_users_role_id_fkey |
|
|
Restrict delete | ||
thumbnail_photo_id_fkey |
|
|
Restrict delete | ||
projects_participant_id_fkey |
|
|
Restrict delete | ||
projects_country_code_fkey |
|
|
Restrict delete | ||
projects_created_by_fkey |
|
|
|||
projects_organization_id_fkey |
|
|
Restrict delete | ||
projects_modified_by_fkey |
|
|
|||
facilities_modified_by_fkey |
|
|
Restrict delete | ||
facilities_time_zone_fkey |
|
|
Null on delete | ||
site_module_type_id_fkey |
|
|
Restrict delete | ||
facilities_created_by_fkey |
|
|
Restrict delete | ||
facilities_connection_state_id_fkey |
|
|
Restrict delete | ||
facilities_organization_id_fkey |
|
|
Cascade on delete | ||
device_managers_facility_id_fkey |
|
|
Restrict delete | ||
device_managers_user_id_fkey |
|
|
Restrict delete | ||
report_files_file_id_fkey |
|
|
Cascade on delete | ||
report_files_report_id_fkey |
|
|
Restrict delete | ||
species_ecosystem_types_ecosystem_type_id_fkey |
|
|
Restrict delete | ||
species_ecosystem_types_species_id_fkey |
|
|
Cascade on delete | ||
devices_created_by_fkey |
|
|
Restrict delete | ||
devices_facility_id_fkey |
|
|
Cascade on delete | ||
devices_modified_by_fkey |
|
|
Restrict delete | ||
devices_parent_id_fkey |
|
|
Restrict delete | ||
timeseries_type_id_fkey |
|
|
Restrict delete | ||
timeseries_device_id_fkey |
|
|
Cascade on delete | ||
timeseries_modified_by_fkey |
|
|
Restrict delete | ||
timeseries_created_by_fkey |
|
|
Restrict delete |
Check Constraints
Table | Constraint Name | Constraint |
---|---|---|
species | species_common_name_check | ((common_name !~ similar_to_escape(' *'::text))) |
species | species_family_name_check | ((family_name !~ similar_to_escape(' *'::text))) |
organizations | country_code_matches_subdivision | (((country_subdivision_code IS NULL) OR (substr(country_subdivision_code, 1, 2) = country_code))) |
organizations | organizations_country_code_check | ((country_code !~ similar_to_escape(' *'::text))) |
organizations | organizations_country_subdivision_code_check | ((country_subdivision_code !~ similar_to_escape(' *'::text))) |
organizations | organizations_description_check | ((description !~ similar_to_escape(' *'::text))) |
organizations | other_type_details_null_or_not_empty | (((organization_type_details IS NULL) OR ((organization_type_details)::text <> ''::text))) |
organizations | other_type_details_only_for_other | ((((organization_type_details IS NULL) AND (organization_type_id <> 6)) OR ((organization_type_details IS NOT NULL) AND (organization_type_id = 6)))) |
reports | cannot_submit_while_locked | (((locked_time IS NULL) OR (submitted_time IS NULL))) |
reports | locked_by_and_time_both_set | ((((locked_by IS NULL) AND (locked_time IS NULL)) OR ((locked_by IS NOT NULL) AND (locked_time IS NOT NULL)))) |
reports | quarter_in_range | (((quarter >= 1) AND (quarter <= 4))) |
reports | status_reflects_locked | ((((locked_by IS NULL) AND (status_id <> 3)) OR ((locked_by IS NOT NULL) AND (status_id = 3)))) |
reports | status_reflects_submitted | ((((submitted_by IS NULL) AND (status_id <> 4)) OR ((submitted_by IS NOT NULL) AND (status_id = 4)))) |
reports | submitted_by_and_time_both_set | ((((submitted_by IS NULL) AND (submitted_time IS NULL)) OR ((submitted_by IS NOT NULL) AND (submitted_time IS NOT NULL)))) |
countries | countries_code_caps | ((code = upper(code))) |
countries | countries_code_length | ((length(code) = 2)) |
device_templates | device_templates_address_check | ((address !~ similar_to_escape(' *'::text))) |
device_templates | device_templates_description_check | ((description !~ similar_to_escape(' *'::text))) |
device_templates | device_templates_protocol_check | ((protocol !~ similar_to_escape(' *'::text))) |
files | content_type_cannot_be_empty_string | ((length(content_type) > 0)) |
files | file_name_cannot_be_empty_string | ((length(file_name) > 0)) |
country_subdivisions | country_subdivisions_code_length | (((length(code) >= 4) AND (length(code) <= 6))) |
country_subdivisions | country_subdivisions_code_matches_country | ((substr(code, 1, 2) = country_code)) |
upload_problems | upload_problems_field_check | ((field !~ similar_to_escape(' *'::text))) |
upload_problems | upload_problems_message_check | ((message !~ similar_to_escape(' *'::text))) |
upload_problems | upload_problems_value_check | ((value !~ similar_to_escape(' *'::text))) |
users | users_auth_id_check | ((auth_id !~ similar_to_escape(' *'::text))) |
users | users_first_name_check | ((first_name !~ similar_to_escape(' *'::text))) |
users | users_last_name_check | ((last_name !~ similar_to_escape(' *'::text))) |
automations | automations_description_check | ((description !~ similar_to_escape(' *'::text))) |
automations | automations_timeseries_name_check | ((timeseries_name !~ similar_to_escape(' *'::text))) |
species_problems | species_problems_suggested_value_check | ((suggested_value !~ similar_to_escape(' *'::text))) |
facilities | facilities_description_check | ((description !~ similar_to_escape(' *'::text))) |
device_managers | device_managers_user_iff_facility | ((((user_id IS NOT NULL) AND (facility_id IS NOT NULL)) OR ((user_id IS NULL) AND (facility_id IS NULL)))) |
devices | devices_address_check | ((address !~ similar_to_escape(' *'::text))) |
devices | devices_protocol_check | ((protocol !~ similar_to_escape(' *'::text))) |
timeseries | timeseries_decimal_places_check | ((decimal_places >= 0)) |
timeseries | timeseries_units_check | ((units !~ similar_to_escape(' *'::text))) |