Constraints

173 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
customers_to_tags_tag_id_fkey
customers_to_tags.tag_id
customers_tags.id
Restrict delete
customers_to_tags_entity_id_fkey
customers_to_tags.entity_id
customers.id
Restrict delete
customers_custom_fields_values_date_custom_field_id_fkey
customers_custom_fields_values_date.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_date_entity_id_fkey
customers_custom_fields_values_date.entity_id
customers.id
Restrict delete
customers_custom_fields_values_select_entity_id_fkey
customers_custom_fields_values_select.entity_id
customers.id
Restrict delete
customers_custom_fields_values_select_custom_field_id_fkey
customers_custom_fields_values_select.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_select_enum_id_fkey
customers_custom_fields_values_select.enum_id
custom_fields_enums.id
Restrict delete
companies_custom_fields_values_checkbox_entity_id_fkey
companies_custom_fields_values_checkbox.entity_id
companies.id
Restrict delete
companies_custom_fields_values_checkbox_custom_field_id_fkey
companies_custom_fields_values_checkbox.custom_field_id
custom_fields.id
Restrict delete
companies_notes_call_in_note_id_fkey
companies_notes_call_in.note_id
companies_notes.id
Restrict delete
customers_notes_sms_in_note_id_fkey
customers_notes_sms_in.note_id
customers_notes.id
Restrict delete
leads_custom_fields_values_select_entity_id_fkey
leads_custom_fields_values_select.entity_id
leads.id
Restrict delete
leads_custom_fields_values_select_custom_field_id_fkey
leads_custom_fields_values_select.custom_field_id
custom_fields.id
Restrict delete
leads_custom_fields_values_select_enum_id_fkey
leads_custom_fields_values_select.enum_id
custom_fields_enums.id
Restrict delete
customers_responsible_user_id_fkey
customers.responsible_user_id
users.id
Restrict delete
unsorted_metadata_forms_uid_fkey
unsorted_metadata_forms.uid
unsorted.uid
Restrict delete
unknown_events_entity_type_fkey
unknown_events.entity_type
entity_types.id
Restrict delete
contacts_notes_call_in_note_id_fkey
contacts_notes_call_in.note_id
contacts_notes.id
Restrict delete
customers_notes_service_message_note_id_fkey
customers_notes_service_message.note_id
customers_notes.id
Restrict delete
unsorted_metadata_chats_uid_fkey
unsorted_metadata_chats.uid
unsorted.uid
Restrict delete
leads_notes_call_out_note_id_fkey
leads_notes_call_out.note_id
leads_notes.id
Restrict delete
companies_custom_fields_values_date_entity_id_fkey
companies_custom_fields_values_date.entity_id
companies.id
Restrict delete
companies_custom_fields_values_date_custom_field_id_fkey
companies_custom_fields_values_date.custom_field_id
custom_fields.id
Restrict delete
statuses_pipeline_id_fkey
statuses.pipeline_id
pipelines.id
Restrict delete
custom_fields_type_id_fkey
custom_fields.type_id
custom_fields_types.id
Restrict delete
leads_custom_fields_values_chained_list_entity_id_fkey
leads_custom_fields_values_chained_list.entity_id
leads.id
Restrict delete
leads_custom_fields_values_chained_list_custom_field_id_fkey
leads_custom_fields_values_chained_list.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_chained_list_entity_id_fkey
companies_custom_fields_values_chained_list.entity_id
companies.id
Restrict delete
companies_custom_fields_values_chained_lis_custom_field_id_fkey
companies_custom_fields_values_chained_list.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_smart_address_enum_id_fkey
companies_custom_fields_values_smart_address.enum_id
custom_fields_enums.id
Restrict delete
companies_custom_fields_values_smart_addre_custom_field_id_fkey
companies_custom_fields_values_smart_address.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_smart_address_entity_id_fkey
companies_custom_fields_values_smart_address.entity_id
companies.id
Restrict delete
contacts_custom_fields_values_chained_list_entity_id_fkey
contacts_custom_fields_values_chained_list.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_chained_list_custom_field_id_fkey
contacts_custom_fields_values_chained_list.custom_field_id
custom_fields.id
Restrict delete
customers_notes_call_in_note_id_fkey
customers_notes_call_in.note_id
customers_notes.id
Restrict delete
leads_loss_reason_id_fkey
leads.loss_reason_id
loss_reasons.id
Restrict delete
leads_status_id_pipeline_id_fkey
leads.status_id
leads.pipeline_id
statuses.id
statuses.pipeline_id
Restrict delete
leads_responsible_user_id_fkey
leads.responsible_user_id
users.id
Restrict delete
leads_pipeline_id_fkey
leads.pipeline_id
pipelines.id
Restrict delete
customers_custom_fields_values_chained_lis_custom_field_id_fkey
customers_custom_fields_values_chained_list.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_chained_list_entity_id_fkey
customers_custom_fields_values_chained_list.entity_id
customers.id
Restrict delete
users_role_id_fkey
users.role_id
roles.id
Restrict delete
leads_custom_fields_values_text_entity_id_fkey
leads_custom_fields_values_text.entity_id
leads.id
Restrict delete
leads_custom_fields_values_text_custom_field_id_fkey
leads_custom_fields_values_text.custom_field_id
custom_fields.id
Restrict delete
companies_notes_message_cashier_note_id_fkey
companies_notes_message_cashier.note_id
companies_notes.id
Restrict delete
leads_to_tags_entity_id_fkey
leads_to_tags.entity_id
leads.id
Restrict delete
leads_to_tags_tag_id_fkey
leads_to_tags.tag_id
leads_tags.id
Restrict delete
leads_custom_fields_values_numeric_custom_field_id_fkey
leads_custom_fields_values_numeric.custom_field_id
custom_fields.id
Restrict delete
leads_custom_fields_values_numeric_entity_id_fkey
leads_custom_fields_values_numeric.entity_id
leads.id
Restrict delete
unsorted_metadata_mail_uid_fkey
unsorted_metadata_mail.uid
unsorted.uid
Restrict delete
leads_notes_call_in_note_id_fkey
leads_notes_call_in.note_id
leads_notes.id
Restrict delete
company_to_contacts_company_id_fkey
company_to_contacts.company_id
companies.id
Restrict delete
company_to_contacts_contact_id_fkey
company_to_contacts.contact_id
contacts.id
Restrict delete
contacts_notes_link_followed_note_id_fkey
contacts_notes_link_followed.note_id
contacts_notes.id
Restrict delete
customers_notes_call_out_note_id_fkey
customers_notes_call_out.note_id
customers_notes.id
Restrict delete
customers_notes_note_type_fkey
customers_notes.note_type
notes_types.id
Restrict delete
contacts_custom_fields_values_legal_entity_entity_id_fkey
contacts_custom_fields_values_legal_entity.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_legal_entity_custom_field_id_fkey
contacts_custom_fields_values_legal_entity.custom_field_id
custom_fields.id
Restrict delete
companies_responsible_user_id_fkey
companies.responsible_user_id
users.id
Restrict delete
customers_notes_attachment_note_id_fkey
customers_notes_attachment.note_id
customers_notes.id
Restrict delete
companies_notes_extended_service_message_note_id_fkey
companies_notes_extended_service_message.note_id
companies_notes.id
Restrict delete
leads_notes_common_note_id_fkey
leads_notes_common.note_id
leads_notes.id
Restrict delete
contacts_notes_geolocation_note_id_fkey
contacts_notes_geolocation.note_id
contacts_notes.id
Restrict delete
contacts_custom_fields_values_multitext_entity_id_fkey
contacts_custom_fields_values_multitext.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_multitext_enum_id_fkey
contacts_custom_fields_values_multitext.enum_id
custom_fields_enums.id
Restrict delete
contacts_custom_fields_values_multitext_custom_field_id_fkey
contacts_custom_fields_values_multitext.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_numeric_custom_field_id_fkey
companies_custom_fields_values_numeric.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_numeric_entity_id_fkey
companies_custom_fields_values_numeric.entity_id
companies.id
Restrict delete
companies_notes_link_followed_note_id_fkey
companies_notes_link_followed.note_id
companies_notes.id
Restrict delete
contacts_notes_service_message_note_id_fkey
contacts_notes_service_message.note_id
contacts_notes.id
Restrict delete
customers_notes_amomail_message_note_id_fkey
customers_notes_amomail_message.note_id
customers_notes.id
Restrict delete
leads_notes_service_message_note_id_fkey
leads_notes_service_message.note_id
leads_notes.id
Restrict delete
companies_to_tags_tag_id_fkey
companies_to_tags.tag_id
companies_tags.id
Restrict delete
companies_to_tags_entity_id_fkey
companies_to_tags.entity_id
companies.id
Restrict delete
leads_notes_link_followed_note_id_fkey
leads_notes_link_followed.note_id
leads_notes.id
Restrict delete
contacts_custom_fields_values_text_entity_id_fkey
contacts_custom_fields_values_text.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_text_custom_field_id_fkey
contacts_custom_fields_values_text.custom_field_id
custom_fields.id
Restrict delete
contacts_notes_call_out_note_id_fkey
contacts_notes_call_out.note_id
contacts_notes.id
Restrict delete
contacts_custom_fields_values_select_custom_field_id_fkey
contacts_custom_fields_values_select.custom_field_id
custom_fields.id
Restrict delete
contacts_custom_fields_values_select_entity_id_fkey
contacts_custom_fields_values_select.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_select_enum_id_fkey
contacts_custom_fields_values_select.enum_id
custom_fields_enums.id
Restrict delete
customers_notes_geolocation_note_id_fkey
customers_notes_geolocation.note_id
customers_notes.id
Restrict delete
leads_notes_attachment_note_id_fkey
leads_notes_attachment.note_id
leads_notes.id
Restrict delete
companies_notes_amomail_message_note_id_fkey
companies_notes_amomail_message.note_id
companies_notes.id
Restrict delete
contacts_responsible_user_id_fkey
contacts.responsible_user_id
users.id
Restrict delete
events_event_type_fkey
events.event_type
event_types.id
Restrict delete
events_entity_type_fkey
events.entity_type
entity_types.id
Restrict delete
unsorted_metadata_sip_uid_fkey
unsorted_metadata_sip.uid
unsorted.uid
Restrict delete
events_custom_fields_values_entity_type_fkey
events_custom_fields_values.entity_type
entity_types.id
Restrict delete
contacts_to_tags_tag_id_fkey
contacts_to_tags.tag_id
contacts_tags.id
Restrict delete
contacts_to_tags_entity_id_fkey
contacts_to_tags.entity_id
contacts.id
Restrict delete
contacts_notes_message_cashier_note_id_fkey
contacts_notes_message_cashier.note_id
contacts_notes.id
Restrict delete
leads_custom_fields_values_checkbox_entity_id_fkey
leads_custom_fields_values_checkbox.entity_id
leads.id
Restrict delete
leads_custom_fields_values_checkbox_custom_field_id_fkey
leads_custom_fields_values_checkbox.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_text_entity_id_fkey
companies_custom_fields_values_text.entity_id
companies.id
Restrict delete
companies_custom_fields_values_text_custom_field_id_fkey
companies_custom_fields_values_text.custom_field_id
custom_fields.id
Restrict delete
leads_notes_sms_out_note_id_fkey
leads_notes_sms_out.note_id
leads_notes.id
Restrict delete
customers_notes_sms_out_note_id_fkey
customers_notes_sms_out.note_id
customers_notes.id
Restrict delete
customers_custom_fields_values_text_entity_id_fkey
customers_custom_fields_values_text.entity_id
customers.id
Restrict delete
customers_custom_fields_values_text_custom_field_id_fkey
customers_custom_fields_values_text.custom_field_id
custom_fields.id
Restrict delete
unsorted_pipeline_id_fkey
unsorted.pipeline_id
pipelines.id
Restrict delete
unsorted_category_id_fkey
unsorted.category_id
unsorted_categories.id
Restrict delete
unsorted_lead_id_fkey
unsorted.lead_id
leads.id
Restrict delete
companies_custom_fields_values_legal_entity_entity_id_fkey
companies_custom_fields_values_legal_entity.entity_id
companies.id
Restrict delete
companies_custom_fields_values_legal_entit_custom_field_id_fkey
companies_custom_fields_values_legal_entity.custom_field_id
custom_fields.id
Restrict delete
customers_notes_message_cashier_note_id_fkey
customers_notes_message_cashier.note_id
customers_notes.id
Restrict delete
leads_custom_fields_values_date_custom_field_id_fkey
leads_custom_fields_values_date.custom_field_id
custom_fields.id
Restrict delete
leads_custom_fields_values_date_entity_id_fkey
leads_custom_fields_values_date.entity_id
leads.id
Restrict delete
companies_notes_sms_in_note_id_fkey
companies_notes_sms_in.note_id
companies_notes.id
Restrict delete
customers_to_segments_entity_id_fkey
customers_to_segments.entity_id
customers.id
Restrict delete
leads_custom_fields_values_legal_entity_custom_field_id_fkey
leads_custom_fields_values_legal_entity.custom_field_id
custom_fields.id
Restrict delete
leads_custom_fields_values_legal_entity_entity_id_fkey
leads_custom_fields_values_legal_entity.entity_id
leads.id
Restrict delete
contacts_notes_common_note_id_fkey
contacts_notes_common.note_id
contacts_notes.id
Restrict delete
customers_notes_extended_service_message_note_id_fkey
customers_notes_extended_service_message.note_id
customers_notes.id
Restrict delete
leads_notes_sms_in_note_id_fkey
leads_notes_sms_in.note_id
leads_notes.id
Restrict delete
leads_notes_geolocation_note_id_fkey
leads_notes_geolocation.note_id
leads_notes.id
Restrict delete
companies_notes_geolocation_note_id_fkey
companies_notes_geolocation.note_id
companies_notes.id
Restrict delete
companies_notes_note_type_fkey
companies_notes.note_type
notes_types.id
Restrict delete
contacts_custom_fields_values_file_custom_field_id_fkey
contacts_custom_fields_values_file.custom_field_id
custom_fields.id
Restrict delete
contacts_custom_fields_values_file_entity_id_fkey
contacts_custom_fields_values_file.entity_id
contacts.id
Restrict delete
companies_notes_call_out_note_id_fkey
companies_notes_call_out.note_id
companies_notes.id
Restrict delete
companies_custom_fields_values_multitext_entity_id_fkey
companies_custom_fields_values_multitext.entity_id
companies.id
Restrict delete
companies_custom_fields_values_multitext_enum_id_fkey
companies_custom_fields_values_multitext.enum_id
custom_fields_enums.id
Restrict delete
companies_custom_fields_values_multitext_custom_field_id_fkey
companies_custom_fields_values_multitext.custom_field_id
custom_fields.id
Restrict delete
leads_notes_extended_service_message_note_id_fkey
leads_notes_extended_service_message.note_id
leads_notes.id
Restrict delete
company_to_leads_company_id_fkey
company_to_leads.company_id
companies.id
Restrict delete
company_to_leads_lead_id_fkey
company_to_leads.lead_id
leads.id
Restrict delete
customers_custom_fields_values_checkbox_custom_field_id_fkey
customers_custom_fields_values_checkbox.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_checkbox_entity_id_fkey
customers_custom_fields_values_checkbox.entity_id
customers.id
Restrict delete
leads_custom_fields_values_smart_address_enum_id_fkey
leads_custom_fields_values_smart_address.enum_id
custom_fields_enums.id
Restrict delete
leads_custom_fields_values_smart_address_entity_id_fkey
leads_custom_fields_values_smart_address.entity_id
leads.id
Restrict delete
leads_custom_fields_values_smart_address_custom_field_id_fkey
leads_custom_fields_values_smart_address.custom_field_id
custom_fields.id
Restrict delete
leads_notes_message_cashier_note_id_fkey
leads_notes_message_cashier.note_id
leads_notes.id
Restrict delete
contacts_notes_sms_out_note_id_fkey
contacts_notes_sms_out.note_id
contacts_notes.id
Restrict delete
companies_notes_attachment_note_id_fkey
companies_notes_attachment.note_id
companies_notes.id
Restrict delete
leads_notes_note_type_fkey
leads_notes.note_type
notes_types.id
Restrict delete
companies_custom_fields_values_file_entity_id_fkey
companies_custom_fields_values_file.entity_id
companies.id
Restrict delete
companies_custom_fields_values_file_custom_field_id_fkey
companies_custom_fields_values_file.custom_field_id
custom_fields.id
Restrict delete
contacts_notes_extended_service_message_note_id_fkey
contacts_notes_extended_service_message.note_id
contacts_notes.id
Restrict delete
contacts_notes_attachment_note_id_fkey
contacts_notes_attachment.note_id
contacts_notes.id
Restrict delete
tasks_entity_type_id_fkey
tasks.entity_type_id
tasks_entity_types.id
Restrict delete
tasks_responsible_user_id_fkey
tasks.responsible_user_id
users.id
Restrict delete
tasks_task_type_id_fkey
tasks.task_type_id
task_types.id
Restrict delete
customers_notes_link_followed_note_id_fkey
customers_notes_link_followed.note_id
customers_notes.id
Restrict delete
companies_custom_fields_values_select_custom_field_id_fkey
companies_custom_fields_values_select.custom_field_id
custom_fields.id
Restrict delete
companies_custom_fields_values_select_entity_id_fkey
companies_custom_fields_values_select.entity_id
companies.id
Restrict delete
companies_custom_fields_values_select_enum_id_fkey
companies_custom_fields_values_select.enum_id
custom_fields_enums.id
Restrict delete
company_to_customers_customer_id_fkey
company_to_customers.customer_id
customers.id
Restrict delete
company_to_customers_company_id_fkey
company_to_customers.company_id
companies.id
Restrict delete
contacts_custom_fields_values_smart_addres_custom_field_id_fkey
contacts_custom_fields_values_smart_address.custom_field_id
custom_fields.id
Restrict delete
contacts_custom_fields_values_smart_address_enum_id_fkey
contacts_custom_fields_values_smart_address.enum_id
custom_fields_enums.id
Restrict delete
contacts_custom_fields_values_smart_address_entity_id_fkey
contacts_custom_fields_values_smart_address.entity_id
contacts.id
Restrict delete
customers_custom_fields_values_file_custom_field_id_fkey
customers_custom_fields_values_file.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_file_entity_id_fkey
customers_custom_fields_values_file.entity_id
customers.id
Restrict delete
companies_notes_sms_out_note_id_fkey
companies_notes_sms_out.note_id
companies_notes.id
Restrict delete
contacts_custom_fields_values_checkbox_entity_id_fkey
contacts_custom_fields_values_checkbox.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_checkbox_custom_field_id_fkey
contacts_custom_fields_values_checkbox.custom_field_id
custom_fields.id
Restrict delete
contacts_custom_fields_values_numeric_entity_id_fkey
contacts_custom_fields_values_numeric.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_numeric_custom_field_id_fkey
contacts_custom_fields_values_numeric.custom_field_id
custom_fields.id
Restrict delete
leads_custom_fields_values_file_entity_id_fkey
leads_custom_fields_values_file.entity_id
leads.id
Restrict delete
leads_custom_fields_values_file_custom_field_id_fkey
leads_custom_fields_values_file.custom_field_id
custom_fields.id
Restrict delete
contacts_custom_fields_values_date_entity_id_fkey
contacts_custom_fields_values_date.entity_id
contacts.id
Restrict delete
contacts_custom_fields_values_date_custom_field_id_fkey
contacts_custom_fields_values_date.custom_field_id
custom_fields.id
Restrict delete
companies_notes_service_message_note_id_fkey
companies_notes_service_message.note_id
companies_notes.id
Restrict delete
contacts_notes_amomail_message_note_id_fkey
contacts_notes_amomail_message.note_id
contacts_notes.id
Restrict delete
contacts_notes_sms_in_note_id_fkey
contacts_notes_sms_in.note_id
contacts_notes.id
Restrict delete
leads_notes_amomail_message_note_id_fkey
leads_notes_amomail_message.note_id
leads_notes.id
Restrict delete
customers_custom_fields_values_numeric_custom_field_id_fkey
customers_custom_fields_values_numeric.custom_field_id
custom_fields.id
Restrict delete
customers_custom_fields_values_numeric_entity_id_fkey
customers_custom_fields_values_numeric.entity_id
customers.id
Restrict delete
customers_notes_common_note_id_fkey
customers_notes_common.note_id
customers_notes.id
Restrict delete
companies_notes_common_note_id_fkey
companies_notes_common.note_id
companies_notes.id
Restrict delete
contacts_notes_note_type_fkey
contacts_notes.note_type
notes_types.id
Restrict delete
customers_notes_transaction_note_id_fkey
customers_notes_transaction.note_id
customers_notes.id
Restrict delete

Check Constraints

Table Constraint Name Constraint
customers_tags customers_tags_id_check ((id > 0))
custom_fields_enums custom_fields_enums_id_check ((id > 0))
customers customers_created_by_check ((created_by >= 0))
customers customers_updated_by_check ((updated_by >= 0))
custom_fields custom_fields_id_check ((id > 0))
leads_custom_fields_values_chained_list leads_custom_fields_values_chained_lis_catalog_element_id_check ((catalog_element_id > 0))
leads_custom_fields_values_chained_list leads_custom_fields_values_chained_list_catalog_id_check ((catalog_id > 0))
custom_fields_types custom_fields_types_id_check ((id > 0))
companies_custom_fields_values_chained_list companies_custom_fields_values_chained_catalog_element_id_check ((catalog_element_id > 0))
companies_custom_fields_values_chained_list companies_custom_fields_values_chained_list_catalog_id_check ((catalog_id > 0))
contacts_custom_fields_values_chained_list contacts_custom_fields_values_chained__catalog_element_id_check ((catalog_element_id > 0))
contacts_custom_fields_values_chained_list contacts_custom_fields_values_chained_list_catalog_id_check ((catalog_id > 0))
tasks_entity_types tasks_entity_types_id_check ((id > 0))
companies_tags companies_tags_id_check ((id > 0))
leads leads_created_by_check ((created_by >= 0))
leads leads_id_check ((id > 0))
leads leads_labor_cost_check ((labor_cost >= 0))
leads leads_price_check ((price >= 0))
leads leads_source_id_check ((source_id > 0))
leads leads_updated_by_check ((updated_by >= 0))
customers_custom_fields_values_chained_list customers_custom_fields_values_chained_catalog_element_id_check ((catalog_element_id > 0))
customers_custom_fields_values_chained_list customers_custom_fields_values_chained_list_catalog_id_check ((catalog_id > 0))
contacts_tags contacts_tags_id_check ((id > 0))
unsorted_metadata_mail unsorted_metadata_mail_message_id_check ((message_id > 0))
unsorted_metadata_mail unsorted_metadata_mail_thread_id_check ((thread_id > 0))
customers_notes customers_notes_created_by_check ((created_by >= 0))
customers_notes customers_notes_id_check ((id > 0))
customers_notes customers_notes_responsible_user_id_check ((responsible_user_id >= 0))
customers_notes customers_notes_updated_by_check ((updated_by >= 0))
contacts_custom_fields_values_legal_entity contacts_custom_fields_values_legal_entity_entity_type_check ((entity_type > 0))
companies companies_created_by_check ((created_by >= 0))
companies companies_id_check ((id > 0))
companies companies_updated_by_check ((updated_by >= 0))
leads_tags leads_tags_id_check ((id > 0))
contacts contacts_created_by_check ((created_by >= 0))
contacts contacts_id_check ((id > 0))
contacts contacts_updated_by_check ((updated_by >= 0))
unsorted_metadata_sip unsorted_metadata_sip_duration_check ((duration >= 0))
companies_custom_fields_values_legal_entity companies_custom_fields_values_legal_entity_entity_type_check ((entity_type > 0))
leads_custom_fields_values_legal_entity leads_custom_fields_values_legal_entity_entity_type_check ((entity_type > 0))
companies_notes companies_notes_created_by_check ((created_by >= 0))
companies_notes companies_notes_id_check ((id > 0))
companies_notes companies_notes_responsible_user_id_check ((responsible_user_id >= 0))
companies_notes companies_notes_updated_by_check ((updated_by >= 0))
leads_notes leads_notes_created_by_check ((created_by >= 0))
leads_notes leads_notes_id_check ((id > 0))
leads_notes leads_notes_responsible_user_id_check ((responsible_user_id >= 0))
leads_notes leads_notes_updated_by_check ((updated_by >= 0))
tasks tasks_created_by_check ((created_by >= 0))
tasks tasks_duration_check ((duration >= 0))
tasks tasks_id_check ((id > 0))
tasks tasks_updated_by_check ((updated_by >= 0))
contacts_notes contacts_notes_created_by_check ((created_by >= 0))
contacts_notes contacts_notes_id_check ((id > 0))
contacts_notes contacts_notes_responsible_user_id_check ((responsible_user_id >= 0))
contacts_notes contacts_notes_updated_by_check ((updated_by >= 0))