Constraints

120 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
events_created_by_fkey
events.created_by
users.id
Restrict delete
events_modified_by_fkey
events.modified_by
users.id
Restrict delete
events_event_type_id_fkey
events.event_type_id
event_types.id
Restrict delete
events_event_status_id_fkey
events.event_status_id
event_statuses.id
Restrict delete
events_module_id_fkey
events.module_id
modules.id
Cascade on delete
deliverable_variables_deliverable_id_fkey
deliverable_variables.deliverable_id
deliverables.id
Cascade on delete
deliverable_variables_variable_id_fkey
deliverable_variables.variable_id
variables.id
Cascade on delete
report_project_metrics_modified_by_fkey
report_project_metrics.modified_by
users.id
Restrict delete
report_project_metrics_project_metric_id_fkey
report_project_metrics.project_metric_id
project_metrics.id
Restrict delete
report_project_metrics_status_id_fkey
report_project_metrics.status_id
report_metric_statuses.id
Restrict delete
report_project_metrics_report_id_fkey
report_project_metrics.report_id
reports.id
Cascade on delete
deliverable_cohort_due_dates_deliverable_id_fkey
deliverable_cohort_due_dates.deliverable_id
deliverables.id
Cascade on delete
deliverable_cohort_due_dates_cohort_id_fkey
deliverable_cohort_due_dates.cohort_id
cohorts.id
Cascade on delete
modules_created_by_fkey
modules.created_by
users.id
Restrict delete
modules_modified_by_fkey
modules.modified_by
users.id
Restrict delete
modules_phase_id_fkey
modules.phase_id
cohort_phases.id
Restrict delete
project_scores_project_id_fkey
project_scores.project_id
projects.id
Cascade on delete
project_scores_phase_id_fkey
project_scores.phase_id
cohort_phases.id
Restrict delete
project_scores_created_by_fkey
project_scores.created_by
users.id
Restrict delete
project_scores_score_category_id_fkey
project_scores.score_category_id
score_categories.id
Restrict delete
project_scores_modified_by_fkey
project_scores.modified_by
users.id
Restrict delete
reports_status_id_fkey
reports.status_id
report_statuses.id
Restrict delete
reports_config_id_fkey
reports.config_id
project_report_configs.id
Restrict delete
reports_config_id_project_id_fkey
reports.config_id
reports.project_id
project_report_configs.id
project_report_configs.project_id
Restrict delete
reports_config_id_report_frequency_id_fkey
reports.config_id
reports.report_frequency_id
project_report_configs.id
project_report_configs.report_frequency_id
Restrict delete
reports_project_id_fkey
reports.project_id
projects.id
Cascade on delete
reports_created_by_fkey
reports.created_by
users.id
Restrict delete
reports_report_frequency_id_fkey
reports.report_frequency_id
report_frequencies.id
Restrict delete
reports_submitted_by_fkey
reports.submitted_by
users.id
Restrict delete
reports_report_quarter_id_fkey
reports.report_quarter_id
report_quarters.id
Restrict delete
reports_modified_by_fkey
reports.modified_by
users.id
Restrict delete
project_accelerator_details_pipeline_id_fkey
project_accelerator_details.pipeline_id
pipelines.id
Restrict delete
project_accelerator_details_deal_stage_id_fkey
project_accelerator_details.deal_stage_id
deal_stages.id
Restrict delete
project_accelerator_details_project_id_fkey
project_accelerator_details.project_id
projects.id
Restrict delete
cohort_modules_cohort_id_fkey
cohort_modules.cohort_id
cohorts.id
Restrict delete
cohort_modules_module_id_fkey
cohort_modules.module_id
modules.id
Restrict delete
report_system_metrics_system_metric_id_fkey
report_system_metrics.system_metric_id
system_metrics.id
Restrict delete
report_system_metrics_status_id_fkey
report_system_metrics.status_id
report_metric_statuses.id
Restrict delete
report_system_metrics_report_id_fkey
report_system_metrics.report_id
reports.id
Cascade on delete
report_system_metrics_modified_by_fkey
report_system_metrics.modified_by
users.id
Restrict delete
deliverable_documents_deliverable_type_id_fkey
deliverable_documents.deliverable_type_id
deliverable_types.id
Restrict delete
deliverable_documents_deliverable_id_deliverable_type_id_fkey
deliverable_documents.deliverable_id
deliverable_documents.deliverable_type_id
deliverables.id
deliverables.deliverable_type_id
Restrict delete
deliverable_documents_deliverable_id_fkey
deliverable_documents.deliverable_id
deliverables.id
Restrict delete
project_overall_scores_modified_by_fkey
project_overall_scores.modified_by
users.id
Restrict delete
project_overall_scores_created_by_fkey
project_overall_scores.created_by
users.id
Restrict delete
project_overall_scores_project_id_fkey
project_overall_scores.project_id
projects.id
Cascade on delete
submission_snapshots_submission_id_fkey
submission_snapshots.submission_id
submissions.id
Restrict delete
submission_snapshots_file_id_fkey
submission_snapshots.file_id
files.id
Cascade on delete
report_challenges_report_id_fkey
report_challenges.report_id
reports.id
Cascade on delete
deliverables_created_by_fkey
deliverables.created_by
users.id
Restrict delete
deliverables_deliverable_category_id_fkey
deliverables.deliverable_category_id
deliverable_categories.id
Restrict delete
deliverables_deliverable_type_id_fkey
deliverables.deliverable_type_id
deliverable_types.id
Restrict delete
deliverables_module_id_fkey
deliverables.module_id
modules.id
Restrict delete
deliverables_modified_by_fkey
deliverables.modified_by
users.id
Restrict delete
default_voters_user_id_fkey
default_voters.user_id
users.id
Cascade on delete
submission_documents_submission_id_fkey
submission_documents.submission_id
submissions.id
Restrict delete
submission_documents_project_id_fkey
submission_documents.project_id
projects.id
Restrict delete
submission_documents_document_store_id_fkey
submission_documents.document_store_id
document_stores.id
Restrict delete
submission_documents_created_by_fkey
submission_documents.created_by
users.id
Restrict delete
report_standard_metrics_status_id_fkey
report_standard_metrics.status_id
report_metric_statuses.id
Restrict delete
report_standard_metrics_report_id_fkey
report_standard_metrics.report_id
reports.id
Cascade on delete
report_standard_metrics_standard_metric_id_fkey
report_standard_metrics.standard_metric_id
standard_metrics.id
Restrict delete
report_standard_metrics_modified_by_fkey
report_standard_metrics.modified_by
users.id
Restrict delete
participants_created_by_fkey
participants.created_by
users.id
Restrict delete
participants_cohort_id_fkey
participants.cohort_id
cohorts.id
Restrict delete
participants_modified_by_fkey
participants.modified_by
users.id
Restrict delete
report_achievements_report_id_fkey
report_achievements.report_id
reports.id
Cascade on delete
deliverable_project_due_dates_project_id_fkey
deliverable_project_due_dates.project_id
projects.id
Cascade on delete
deliverable_project_due_dates_deliverable_id_fkey
deliverable_project_due_dates.deliverable_id
deliverables.id
Cascade on delete
project_report_configs_report_frequency_id_fkey
project_report_configs.report_frequency_id
report_frequencies.id
Restrict delete
project_report_configs_project_id_fkey
project_report_configs.project_id
projects.id
Cascade on delete
cohorts_phase_id_fkey
cohorts.phase_id
cohort_phases.id
Restrict delete
cohorts_created_by_fkey
cohorts.created_by
users.id
Restrict delete
cohorts_modified_by_fkey
cohorts.modified_by
users.id
Restrict delete
project_metrics_project_id_fkey
project_metrics.project_id
projects.id
Cascade on delete
project_metrics_component_id_fkey
project_metrics.component_id
metric_components.id
Restrict delete
project_metrics_type_id_fkey
project_metrics.type_id
metric_types.id
Restrict delete
applications_country_code_fkey
applications.country_code
countries.code
Restrict delete
applications_project_id_fkey
applications.project_id
projects.id
Cascade on delete
applications_created_by_fkey
applications.created_by
users.id
Restrict delete
applications_modified_by_fkey
applications.modified_by
users.id
Restrict delete
applications_application_status_id_fkey
applications.application_status_id
application_statuses.id
Restrict delete
application_histories_modified_by_fkey
application_histories.modified_by
users.id
Restrict delete
application_histories_application_id_fkey
application_histories.application_id
applications.id
Cascade on delete
application_histories_application_status_id_fkey
application_histories.application_status_id
application_statuses.id
Restrict delete
deliverable_categories_internal_interest_id_fkey
deliverable_categories.internal_interest_id
internal_interests.id
Restrict delete
system_metrics_component_id_fkey
system_metrics.component_id
metric_components.id
Restrict delete
system_metrics_type_id_fkey
system_metrics.type_id
metric_types.id
Restrict delete
submissions_created_by_fkey
submissions.created_by
users.id
Restrict delete
submissions_deliverable_id_fkey
submissions.deliverable_id
deliverables.id
Restrict delete
submissions_submission_status_id_fkey
submissions.submission_status_id
submission_statuses.id
Restrict delete
submissions_modified_by_fkey
submissions.modified_by
users.id
Restrict delete
submissions_project_id_fkey
submissions.project_id
projects.id
Cascade on delete
user_internal_interests_user_id_fkey
user_internal_interests.user_id
users.id
Restrict delete
user_internal_interests_internal_interest_id_fkey
user_internal_interests.internal_interest_id
internal_interests.id
Cascade on delete
user_internal_interests_created_by_fkey
user_internal_interests.created_by
users.id
Restrict delete
event_projects_event_id_fkey
event_projects.event_id
events.id
Cascade on delete
event_projects_project_id_fkey
event_projects.project_id
projects.id
Cascade on delete
participant_project_species_submission_status_id_fkey
participant_project_species.submission_status_id
submission_statuses.id
Restrict delete
participant_project_species_created_by_fkey
participant_project_species.created_by
users.id
Restrict delete
participant_project_species_modified_by_fkey
participant_project_species.modified_by
users.id
Restrict delete
participant_project_species_project_id_fkey
participant_project_species.project_id
projects.id
Cascade on delete
participant_project_species_species_native_category_id_fkey
participant_project_species.species_native_category_id
species_native_categories.id
Restrict delete
participant_project_species_species_id_fkey
participant_project_species.species_id
species.id
Cascade on delete
standard_metrics_component_id_fkey
standard_metrics.component_id
metric_components.id
Restrict delete
standard_metrics_type_id_fkey
standard_metrics.type_id
metric_types.id
Restrict delete
default_project_leads_region_id_fkey
default_project_leads.region_id
regions.id
Restrict delete
project_votes_project_id_fkey
project_votes.project_id
projects.id
Cascade on delete
project_votes_user_id_fkey
project_votes.user_id
users.id
Cascade on delete
project_votes_modified_by_fkey
project_votes.modified_by
users.id
Restrict delete
project_votes_created_by_fkey
project_votes.created_by
users.id
Restrict delete
project_votes_vote_option_id_fkey
project_votes.vote_option_id
vote_options.id
Restrict delete
project_votes_phase_id_fkey
project_votes.phase_id
cohort_phases.id
Restrict delete
project_vote_decisions_project_id_fkey
project_vote_decisions.project_id
projects.id
Cascade on delete
project_vote_decisions_vote_option_id_fkey
project_vote_decisions.vote_option_id
vote_options.id
Restrict delete
project_vote_decisions_phase_id_fkey
project_vote_decisions.phase_id
cohort_phases.id
Restrict delete
deal_stages_pipeline_id_fkey
deal_stages.pipeline_id
pipelines.id
Restrict delete
application_modules_application_module_status_id_fkey
application_modules.application_module_status_id
application_module_statuses.id
Restrict delete
application_modules_module_id_fkey
application_modules.module_id
modules.id
Restrict delete
application_modules_application_id_fkey
application_modules.application_id
applications.id
Cascade on delete

Check Constraints

Table Constraint Name Constraint
events times_start_before_end (start_time <= end_time)
project_scores project_scores_score_check ((score >= '-2'::integer) AND (score <= 2))
reports quarterly_report_has_quarter (((report_frequency_id = 1) AND (report_quarter_id IS NOT NULL) AND ((report_quarter_id)::numeric = EXTRACT(quarter FROM start_date)) AND ((report_quarter_id)::numeric = EXTRACT(quarter FROM end_date))) OR ((report_frequency_id <> 1) AND (report_quarter_id IS NULL)))
reports reports_check (end_date > start_date)
reports submitted_status (((status_id = 1) AND (submitted_by IS NULL) AND (submitted_time IS NULL)) OR (((status_id = 2) OR (status_id = 3) OR (status_id = 4)) AND (submitted_by IS NOT NULL) AND (submitted_time IS NOT NULL)) OR (status_id = 5))
cohort_modules dates_start_before_end (start_date < end_date)
report_system_metrics system_time (((system_value IS NULL) AND (system_time IS NULL)) OR ((system_value IS NOT NULL) AND (system_time IS NOT NULL)))
deliverable_documents deliverable_is_document (deliverable_type_id = 1)
report_challenges report_challenges_position_check ("position" >= 0)
report_achievements report_achievements_position_check ("position" >= 0)
project_report_configs project_report_configs_check (reporting_end_date > reporting_start_date)