-- Name: crm_lead_crm_lead2opportunity_partner_mass_rel crm_lead_crm_lead2opportunity_partner_mass_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_crm_lead2opportunity_partner_mass_rel
    ADD CONSTRAINT crm_lead_crm_lead2opportunity_partner_mass_rel_pkey PRIMARY KEY (crm_lead2opportunity_partner_mass_id, crm_lead_id);


--
-- Name: crm_lead_crm_lead2opportunity_partner_rel crm_lead_crm_lead2opportunity_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_crm_lead2opportunity_partner_rel
    ADD CONSTRAINT crm_lead_crm_lead2opportunity_partner_rel_pkey PRIMARY KEY (crm_lead2opportunity_partner_id, crm_lead_id);


--
-- Name: crm_lead_crm_lead_lost_rel crm_lead_crm_lead_lost_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_crm_lead_lost_rel
    ADD CONSTRAINT crm_lead_crm_lead_lost_rel_pkey PRIMARY KEY (crm_lead_lost_id, crm_lead_id);


--
-- Name: crm_lead_lost crm_lead_lost_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_lost
    ADD CONSTRAINT crm_lead_lost_pkey PRIMARY KEY (id);


--
-- Name: crm_lead crm_lead_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead
    ADD CONSTRAINT crm_lead_pkey PRIMARY KEY (id);


--
-- Name: crm_lead_pls_update_crm_lead_scoring_frequency_field_rel crm_lead_pls_update_crm_lead_scoring_frequency_field_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_pls_update_crm_lead_scoring_frequency_field_rel
    ADD CONSTRAINT crm_lead_pls_update_crm_lead_scoring_frequency_field_rel_pkey PRIMARY KEY (crm_lead_pls_update_id, crm_lead_scoring_frequency_field_id);


--
-- Name: crm_lead_pls_update crm_lead_pls_update_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_pls_update
    ADD CONSTRAINT crm_lead_pls_update_pkey PRIMARY KEY (id);


--
-- Name: crm_lead_scoring_frequency_field crm_lead_scoring_frequency_field_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_scoring_frequency_field
    ADD CONSTRAINT crm_lead_scoring_frequency_field_pkey PRIMARY KEY (id);


--
-- Name: crm_lead_scoring_frequency crm_lead_scoring_frequency_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_scoring_frequency
    ADD CONSTRAINT crm_lead_scoring_frequency_pkey PRIMARY KEY (id);


--
-- Name: crm_lead_website_visitor_rel crm_lead_website_visitor_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lead_website_visitor_rel
    ADD CONSTRAINT crm_lead_website_visitor_rel_pkey PRIMARY KEY (crm_lead_id, website_visitor_id);


--
-- Name: crm_lost_reason crm_lost_reason_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_lost_reason
    ADD CONSTRAINT crm_lost_reason_pkey PRIMARY KEY (id);


--
-- Name: crm_merge_opportunity crm_merge_opportunity_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_merge_opportunity
    ADD CONSTRAINT crm_merge_opportunity_pkey PRIMARY KEY (id);


--
-- Name: crm_quotation_partner crm_quotation_partner_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_quotation_partner
    ADD CONSTRAINT crm_quotation_partner_pkey PRIMARY KEY (id);


--
-- Name: crm_recurring_plan crm_recurring_plan_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_recurring_plan
    ADD CONSTRAINT crm_recurring_plan_pkey PRIMARY KEY (id);


--
-- Name: crm_stage crm_stage_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_stage
    ADD CONSTRAINT crm_stage_pkey PRIMARY KEY (id);


--
-- Name: crm_tag crm_tag_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_tag
    ADD CONSTRAINT crm_tag_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT crm_tag_name_uniq ON crm_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT crm_tag_name_uniq ON public.crm_tag IS 'unique (name)';


--
-- Name: crm_tag crm_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_tag
    ADD CONSTRAINT crm_tag_pkey PRIMARY KEY (id);


--
-- Name: crm_tag_rel crm_tag_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_tag_rel
    ADD CONSTRAINT crm_tag_rel_pkey PRIMARY KEY (lead_id, tag_id);


--
-- Name: crm_team_member crm_team_member_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_team_member
    ADD CONSTRAINT crm_team_member_pkey PRIMARY KEY (id);


--
-- Name: crm_team crm_team_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.crm_team
    ADD CONSTRAINT crm_team_pkey PRIMARY KEY (id);


--
-- Name: decimal_precision decimal_precision_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.decimal_precision
    ADD CONSTRAINT decimal_precision_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT decimal_precision_name_uniq ON decimal_precision; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT decimal_precision_name_uniq ON public.decimal_precision IS 'unique (name)';


--
-- Name: decimal_precision decimal_precision_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.decimal_precision
    ADD CONSTRAINT decimal_precision_pkey PRIMARY KEY (id);


--
-- Name: digest_digest digest_digest_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.digest_digest
    ADD CONSTRAINT digest_digest_pkey PRIMARY KEY (id);


--
-- Name: digest_digest_res_users_rel digest_digest_res_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.digest_digest_res_users_rel
    ADD CONSTRAINT digest_digest_res_users_rel_pkey PRIMARY KEY (digest_digest_id, res_users_id);


--
-- Name: digest_tip digest_tip_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.digest_tip
    ADD CONSTRAINT digest_tip_pkey PRIMARY KEY (id);


--
-- Name: digest_tip_res_users_rel digest_tip_res_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.digest_tip_res_users_rel
    ADD CONSTRAINT digest_tip_res_users_rel_pkey PRIMARY KEY (digest_tip_id, res_users_id);


--
-- Name: discuss_channel discuss_channel_from_message_id_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel
    ADD CONSTRAINT discuss_channel_from_message_id_unique UNIQUE (from_message_id);


--
-- Name: CONSTRAINT discuss_channel_from_message_id_unique ON discuss_channel; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT discuss_channel_from_message_id_unique ON public.discuss_channel IS 'UNIQUE(from_message_id)';


--
-- Name: discuss_channel_hr_department_rel discuss_channel_hr_department_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel_hr_department_rel
    ADD CONSTRAINT discuss_channel_hr_department_rel_pkey PRIMARY KEY (discuss_channel_id, hr_department_id);


--
-- Name: discuss_channel_member discuss_channel_member_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel_member
    ADD CONSTRAINT discuss_channel_member_pkey PRIMARY KEY (id);


--
-- Name: discuss_channel discuss_channel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel
    ADD CONSTRAINT discuss_channel_pkey PRIMARY KEY (id);


--
-- Name: discuss_channel_res_groups_rel discuss_channel_res_groups_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel_res_groups_rel
    ADD CONSTRAINT discuss_channel_res_groups_rel_pkey PRIMARY KEY (discuss_channel_id, res_groups_id);


--
-- Name: discuss_channel_rtc_session discuss_channel_rtc_session_channel_member_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel_rtc_session
    ADD CONSTRAINT discuss_channel_rtc_session_channel_member_unique UNIQUE (channel_member_id);


--
-- Name: CONSTRAINT discuss_channel_rtc_session_channel_member_unique ON discuss_channel_rtc_session; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT discuss_channel_rtc_session_channel_member_unique ON public.discuss_channel_rtc_session IS 'UNIQUE(channel_member_id)';


--
-- Name: discuss_channel_rtc_session discuss_channel_rtc_session_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel_rtc_session
    ADD CONSTRAINT discuss_channel_rtc_session_pkey PRIMARY KEY (id);


--
-- Name: discuss_channel discuss_channel_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_channel
    ADD CONSTRAINT discuss_channel_uuid_unique UNIQUE (uuid);


--
-- Name: CONSTRAINT discuss_channel_uuid_unique ON discuss_channel; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT discuss_channel_uuid_unique ON public.discuss_channel IS 'UNIQUE(uuid)';


--
-- Name: discuss_gif_favorite discuss_gif_favorite_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_gif_favorite
    ADD CONSTRAINT discuss_gif_favorite_pkey PRIMARY KEY (id);


--
-- Name: discuss_gif_favorite discuss_gif_favorite_user_gif_favorite; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_gif_favorite
    ADD CONSTRAINT discuss_gif_favorite_user_gif_favorite UNIQUE (create_uid, tenor_gif_id);


--
-- Name: CONSTRAINT discuss_gif_favorite_user_gif_favorite ON discuss_gif_favorite; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT discuss_gif_favorite_user_gif_favorite ON public.discuss_gif_favorite IS 'unique(create_uid,tenor_gif_id)';


--
-- Name: discuss_voice_metadata discuss_voice_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.discuss_voice_metadata
    ADD CONSTRAINT discuss_voice_metadata_pkey PRIMARY KEY (id);


--
-- Name: email_template_attachment_rel email_template_attachment_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.email_template_attachment_rel
    ADD CONSTRAINT email_template_attachment_rel_pkey PRIMARY KEY (email_template_id, attachment_id);


--
-- Name: employee_category_rel employee_category_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.employee_category_rel
    ADD CONSTRAINT employee_category_rel_pkey PRIMARY KEY (employee_id, category_id);


--
-- Name: fetchmail_server fetchmail_server_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.fetchmail_server
    ADD CONSTRAINT fetchmail_server_pkey PRIMARY KEY (id);


--
-- Name: gamification_badge gamification_badge_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_badge
    ADD CONSTRAINT gamification_badge_pkey PRIMARY KEY (id);


--
-- Name: gamification_badge_rule_badge_rel gamification_badge_rule_badge_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_badge_rule_badge_rel
    ADD CONSTRAINT gamification_badge_rule_badge_rel_pkey PRIMARY KEY (badge1_id, badge2_id);


--
-- Name: gamification_badge_user gamification_badge_user_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_badge_user
    ADD CONSTRAINT gamification_badge_user_pkey PRIMARY KEY (id);


--
-- Name: gamification_badge_user_wizard gamification_badge_user_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_badge_user_wizard
    ADD CONSTRAINT gamification_badge_user_wizard_pkey PRIMARY KEY (id);


--
-- Name: gamification_challenge_line gamification_challenge_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_challenge_line
    ADD CONSTRAINT gamification_challenge_line_pkey PRIMARY KEY (id);


--
-- Name: gamification_challenge gamification_challenge_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_challenge
    ADD CONSTRAINT gamification_challenge_pkey PRIMARY KEY (id);


--
-- Name: gamification_challenge_users_rel gamification_challenge_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_challenge_users_rel
    ADD CONSTRAINT gamification_challenge_users_rel_pkey PRIMARY KEY (gamification_challenge_id, res_users_id);


--
-- Name: gamification_goal_definition gamification_goal_definition_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_goal_definition
    ADD CONSTRAINT gamification_goal_definition_pkey PRIMARY KEY (id);


--
-- Name: gamification_goal gamification_goal_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_goal
    ADD CONSTRAINT gamification_goal_pkey PRIMARY KEY (id);


--
-- Name: gamification_goal_wizard gamification_goal_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_goal_wizard
    ADD CONSTRAINT gamification_goal_wizard_pkey PRIMARY KEY (id);


--
-- Name: gamification_invited_user_ids_rel gamification_invited_user_ids_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_invited_user_ids_rel
    ADD CONSTRAINT gamification_invited_user_ids_rel_pkey PRIMARY KEY (gamification_challenge_id, res_users_id);


--
-- Name: gamification_karma_rank gamification_karma_rank_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_karma_rank
    ADD CONSTRAINT gamification_karma_rank_pkey PRIMARY KEY (id);


--
-- Name: gamification_karma_tracking gamification_karma_tracking_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.gamification_karma_tracking
    ADD CONSTRAINT gamification_karma_tracking_pkey PRIMARY KEY (id);


--
-- Name: header_footer_quotation_template_rel header_footer_quotation_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.header_footer_quotation_template_rel
    ADD CONSTRAINT header_footer_quotation_template_rel_pkey PRIMARY KEY (quotation_document_id, sale_order_template_id);


--
-- Name: hr_contract_type hr_contract_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_contract_type
    ADD CONSTRAINT hr_contract_type_pkey PRIMARY KEY (id);


--
-- Name: hr_department hr_department_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_department
    ADD CONSTRAINT hr_department_pkey PRIMARY KEY (id);


--
-- Name: hr_departure_reason hr_departure_reason_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_departure_reason
    ADD CONSTRAINT hr_departure_reason_pkey PRIMARY KEY (id);


--
-- Name: hr_departure_wizard hr_departure_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_departure_wizard
    ADD CONSTRAINT hr_departure_wizard_pkey PRIMARY KEY (id);


--
-- Name: hr_employee hr_employee_barcode_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee
    ADD CONSTRAINT hr_employee_barcode_uniq UNIQUE (barcode);


--
-- Name: CONSTRAINT hr_employee_barcode_uniq ON hr_employee; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_employee_barcode_uniq ON public.hr_employee IS 'unique (barcode)';


--
-- Name: hr_employee_category hr_employee_category_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_category
    ADD CONSTRAINT hr_employee_category_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT hr_employee_category_name_uniq ON hr_employee_category; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_employee_category_name_uniq ON public.hr_employee_category IS 'unique (name)';


--
-- Name: hr_employee_category hr_employee_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_category
    ADD CONSTRAINT hr_employee_category_pkey PRIMARY KEY (id);


--
-- Name: hr_employee_cv_wizard hr_employee_cv_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_cv_wizard
    ADD CONSTRAINT hr_employee_cv_wizard_pkey PRIMARY KEY (id);


--
-- Name: hr_employee_hr_employee_cv_wizard_rel hr_employee_hr_employee_cv_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_hr_employee_cv_wizard_rel
    ADD CONSTRAINT hr_employee_hr_employee_cv_wizard_rel_pkey PRIMARY KEY (hr_employee_cv_wizard_id, hr_employee_id);


--
-- Name: hr_employee_hr_skill_rel hr_employee_hr_skill_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_hr_skill_rel
    ADD CONSTRAINT hr_employee_hr_skill_rel_pkey PRIMARY KEY (hr_employee_id, hr_skill_id);


--
-- Name: hr_employee hr_employee_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee
    ADD CONSTRAINT hr_employee_pkey PRIMARY KEY (id);


--
-- Name: hr_employee_skill hr_employee_skill__unique_skill; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_skill
    ADD CONSTRAINT hr_employee_skill__unique_skill UNIQUE (employee_id, skill_id);


--
-- Name: CONSTRAINT hr_employee_skill__unique_skill ON hr_employee_skill; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_employee_skill__unique_skill ON public.hr_employee_skill IS 'unique (employee_id, skill_id)';


--
-- Name: hr_employee_skill_log hr_employee_skill_log__unique_skill_log; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_skill_log
    ADD CONSTRAINT hr_employee_skill_log__unique_skill_log UNIQUE (employee_id, department_id, skill_id, date);


--
-- Name: CONSTRAINT hr_employee_skill_log__unique_skill_log ON hr_employee_skill_log; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_employee_skill_log__unique_skill_log ON public.hr_employee_skill_log IS 'unique (employee_id, department_id, skill_id, date)';


--
-- Name: hr_employee_skill_log hr_employee_skill_log_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_skill_log
    ADD CONSTRAINT hr_employee_skill_log_pkey PRIMARY KEY (id);


--
-- Name: hr_employee_skill hr_employee_skill_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_skill
    ADD CONSTRAINT hr_employee_skill_pkey PRIMARY KEY (id);


--
-- Name: hr_employee hr_employee_user_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee
    ADD CONSTRAINT hr_employee_user_uniq UNIQUE (user_id, company_id);


--
-- Name: CONSTRAINT hr_employee_user_uniq ON hr_employee; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_employee_user_uniq ON public.hr_employee IS 'unique (user_id, company_id)';


--
-- Name: hr_job hr_job_name_company_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_job
    ADD CONSTRAINT hr_job_name_company_uniq UNIQUE (name, company_id, department_id);


--
-- Name: CONSTRAINT hr_job_name_company_uniq ON hr_job; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT hr_job_name_company_uniq ON public.hr_job IS 'unique(name, company_id, department_id)';


--
-- Name: hr_job hr_job_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_job
    ADD CONSTRAINT hr_job_pkey PRIMARY KEY (id);


--
-- Name: hr_resume_line hr_resume_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_resume_line
    ADD CONSTRAINT hr_resume_line_pkey PRIMARY KEY (id);


--
-- Name: hr_resume_line_type hr_resume_line_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_resume_line_type
    ADD CONSTRAINT hr_resume_line_type_pkey PRIMARY KEY (id);


--
-- Name: hr_skill_level hr_skill_level_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_skill_level
    ADD CONSTRAINT hr_skill_level_pkey PRIMARY KEY (id);


--
-- Name: hr_skill hr_skill_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_skill
    ADD CONSTRAINT hr_skill_pkey PRIMARY KEY (id);


--
-- Name: hr_skill_type hr_skill_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_skill_type
    ADD CONSTRAINT hr_skill_type_pkey PRIMARY KEY (id);


--
-- Name: hr_work_location hr_work_location_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_work_location
    ADD CONSTRAINT hr_work_location_pkey PRIMARY KEY (id);


--
-- Name: iap_account iap_account_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.iap_account
    ADD CONSTRAINT iap_account_pkey PRIMARY KEY (id);


--
-- Name: iap_account_res_company_rel iap_account_res_company_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.iap_account_res_company_rel
    ADD CONSTRAINT iap_account_res_company_rel_pkey PRIMARY KEY (iap_account_id, res_company_id);


--
-- Name: iap_account_res_users_rel iap_account_res_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.iap_account_res_users_rel
    ADD CONSTRAINT iap_account_res_users_rel_pkey PRIMARY KEY (iap_account_id, res_users_id);


--
-- Name: iap_service iap_service_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.iap_service
    ADD CONSTRAINT iap_service_pkey PRIMARY KEY (id);


--
-- Name: iap_service iap_service_unique_technical_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.iap_service
    ADD CONSTRAINT iap_service_unique_technical_name UNIQUE (technical_name);


--
-- Name: CONSTRAINT iap_service_unique_technical_name ON iap_service; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT iap_service_unique_technical_name ON public.iap_service IS 'UNIQUE(technical_name)';


--
-- Name: ir_act_client ir_act_client_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_client
    ADD CONSTRAINT ir_act_client_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_act_client_path_unique ON ir_act_client; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_act_client_path_unique ON public.ir_act_client IS 'unique(path)';


--
-- Name: ir_act_client ir_act_client_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_client
    ADD CONSTRAINT ir_act_client_pkey PRIMARY KEY (id);


--
-- Name: ir_act_report_xml ir_act_report_xml_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_report_xml
    ADD CONSTRAINT ir_act_report_xml_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_act_report_xml_path_unique ON ir_act_report_xml; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_act_report_xml_path_unique ON public.ir_act_report_xml IS 'unique(path)';


--
-- Name: ir_act_report_xml ir_act_report_xml_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_report_xml
    ADD CONSTRAINT ir_act_report_xml_pkey PRIMARY KEY (id);


--
-- Name: ir_act_server_group_rel ir_act_server_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_server_group_rel
    ADD CONSTRAINT ir_act_server_group_rel_pkey PRIMARY KEY (act_id, gid);


--
-- Name: ir_act_server ir_act_server_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_server
    ADD CONSTRAINT ir_act_server_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_act_server_path_unique ON ir_act_server; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_act_server_path_unique ON public.ir_act_server IS 'unique(path)';


--
-- Name: ir_act_server ir_act_server_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_server
    ADD CONSTRAINT ir_act_server_pkey PRIMARY KEY (id);


--
-- Name: ir_act_server_res_partner_rel ir_act_server_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_server_res_partner_rel
    ADD CONSTRAINT ir_act_server_res_partner_rel_pkey PRIMARY KEY (ir_act_server_id, res_partner_id);


--
-- Name: ir_act_server_webhook_field_rel ir_act_server_webhook_field_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_server_webhook_field_rel
    ADD CONSTRAINT ir_act_server_webhook_field_rel_pkey PRIMARY KEY (server_id, field_id);


--
-- Name: ir_act_url ir_act_url_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_url
    ADD CONSTRAINT ir_act_url_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_act_url_path_unique ON ir_act_url; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_act_url_path_unique ON public.ir_act_url IS 'unique(path)';


--
-- Name: ir_act_url ir_act_url_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_url
    ADD CONSTRAINT ir_act_url_pkey PRIMARY KEY (id);


--
-- Name: ir_act_window_group_rel ir_act_window_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_window_group_rel
    ADD CONSTRAINT ir_act_window_group_rel_pkey PRIMARY KEY (act_id, gid);


--
-- Name: ir_act_window ir_act_window_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_window
    ADD CONSTRAINT ir_act_window_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_act_window_path_unique ON ir_act_window; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_act_window_path_unique ON public.ir_act_window IS 'unique(path)';


--
-- Name: ir_act_window ir_act_window_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_window
    ADD CONSTRAINT ir_act_window_pkey PRIMARY KEY (id);


--
-- Name: ir_act_window_view ir_act_window_view_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_act_window_view
    ADD CONSTRAINT ir_act_window_view_pkey PRIMARY KEY (id);


--
-- Name: ir_actions ir_actions_path_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_actions
    ADD CONSTRAINT ir_actions_path_unique UNIQUE (path);


--
-- Name: CONSTRAINT ir_actions_path_unique ON ir_actions; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_actions_path_unique ON public.ir_actions IS 'unique(path)';


--
-- Name: ir_actions ir_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_actions
    ADD CONSTRAINT ir_actions_pkey PRIMARY KEY (id);


--
-- Name: ir_actions_todo ir_actions_todo_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_actions_todo
    ADD CONSTRAINT ir_actions_todo_pkey PRIMARY KEY (id);


--
-- Name: ir_asset ir_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_asset
    ADD CONSTRAINT ir_asset_pkey PRIMARY KEY (id);


--
-- Name: ir_attachment ir_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_attachment
    ADD CONSTRAINT ir_attachment_pkey PRIMARY KEY (id);


--
-- Name: ir_config_parameter ir_config_parameter_key_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_config_parameter
    ADD CONSTRAINT ir_config_parameter_key_uniq UNIQUE (key);


--
-- Name: CONSTRAINT ir_config_parameter_key_uniq ON ir_config_parameter; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_config_parameter_key_uniq ON public.ir_config_parameter IS 'unique (key)';


--
-- Name: ir_config_parameter ir_config_parameter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_config_parameter
    ADD CONSTRAINT ir_config_parameter_pkey PRIMARY KEY (id);


--
-- Name: ir_cron ir_cron_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_cron
    ADD CONSTRAINT ir_cron_pkey PRIMARY KEY (id);


--
-- Name: ir_cron_progress ir_cron_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_cron_progress
    ADD CONSTRAINT ir_cron_progress_pkey PRIMARY KEY (id);


--
-- Name: ir_cron_trigger ir_cron_trigger_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_cron_trigger
    ADD CONSTRAINT ir_cron_trigger_pkey PRIMARY KEY (id);


--
-- Name: ir_default ir_default_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_default
    ADD CONSTRAINT ir_default_pkey PRIMARY KEY (id);


--
-- Name: ir_demo_failure ir_demo_failure_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_demo_failure
    ADD CONSTRAINT ir_demo_failure_pkey PRIMARY KEY (id);


--
-- Name: ir_demo_failure_wizard ir_demo_failure_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_demo_failure_wizard
    ADD CONSTRAINT ir_demo_failure_wizard_pkey PRIMARY KEY (id);


--
-- Name: ir_demo ir_demo_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_demo
    ADD CONSTRAINT ir_demo_pkey PRIMARY KEY (id);


--
-- Name: ir_embedded_actions ir_embedded_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_embedded_actions
    ADD CONSTRAINT ir_embedded_actions_pkey PRIMARY KEY (id);


--
-- Name: ir_embedded_actions_res_groups_rel ir_embedded_actions_res_groups_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_embedded_actions_res_groups_rel
    ADD CONSTRAINT ir_embedded_actions_res_groups_rel_pkey PRIMARY KEY (ir_embedded_actions_id, res_groups_id);


--
-- Name: ir_exports_line ir_exports_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_exports_line
    ADD CONSTRAINT ir_exports_line_pkey PRIMARY KEY (id);


--
-- Name: ir_exports ir_exports_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_exports
    ADD CONSTRAINT ir_exports_pkey PRIMARY KEY (id);


--
-- Name: ir_filters ir_filters_name_model_uid_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_filters
    ADD CONSTRAINT ir_filters_name_model_uid_unique UNIQUE (model_id, user_id, action_id, embedded_action_id, embedded_parent_res_id, name);


--
-- Name: CONSTRAINT ir_filters_name_model_uid_unique ON ir_filters; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_filters_name_model_uid_unique ON public.ir_filters IS 'unique (model_id, user_id, action_id, embedded_action_id, embedded_parent_res_id, name)';


--
-- Name: ir_filters ir_filters_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_filters
    ADD CONSTRAINT ir_filters_pkey PRIMARY KEY (id);


--
-- Name: ir_logging ir_logging_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_logging
    ADD CONSTRAINT ir_logging_pkey PRIMARY KEY (id);


--
-- Name: ir_mail_server ir_mail_server_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_mail_server
    ADD CONSTRAINT ir_mail_server_pkey PRIMARY KEY (id);


--
-- Name: ir_model_access ir_model_access_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_access
    ADD CONSTRAINT ir_model_access_pkey PRIMARY KEY (id);


--
-- Name: ir_model_constraint ir_model_constraint_module_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_constraint
    ADD CONSTRAINT ir_model_constraint_module_name_uniq UNIQUE (name, module);


--
-- Name: CONSTRAINT ir_model_constraint_module_name_uniq ON ir_model_constraint; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_model_constraint_module_name_uniq ON public.ir_model_constraint IS 'unique(name, module)';


--
-- Name: ir_model_constraint ir_model_constraint_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_constraint
    ADD CONSTRAINT ir_model_constraint_pkey PRIMARY KEY (id);


--
-- Name: ir_model_data ir_model_data_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_data
    ADD CONSTRAINT ir_model_data_pkey PRIMARY KEY (id);


--
-- Name: ir_model_fields_group_rel ir_model_fields_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_fields_group_rel
    ADD CONSTRAINT ir_model_fields_group_rel_pkey PRIMARY KEY (field_id, group_id);


--
-- Name: ir_model_fields ir_model_fields_name_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_fields
    ADD CONSTRAINT ir_model_fields_name_unique UNIQUE (model, name);


--
-- Name: CONSTRAINT ir_model_fields_name_unique ON ir_model_fields; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_model_fields_name_unique ON public.ir_model_fields IS 'UNIQUE(model, name)';


--
-- Name: ir_model_fields ir_model_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_fields
    ADD CONSTRAINT ir_model_fields_pkey PRIMARY KEY (id);


--
-- Name: ir_model_fields_selection ir_model_fields_selection_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_fields_selection
    ADD CONSTRAINT ir_model_fields_selection_pkey PRIMARY KEY (id);


--
-- Name: ir_model_fields_selection ir_model_fields_selection_selection_field_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_fields_selection
    ADD CONSTRAINT ir_model_fields_selection_selection_field_uniq UNIQUE (field_id, value);


--
-- Name: CONSTRAINT ir_model_fields_selection_selection_field_uniq ON ir_model_fields_selection; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_model_fields_selection_selection_field_uniq ON public.ir_model_fields_selection IS 'unique(field_id, value)';


--
-- Name: ir_model_inherit ir_model_inherit_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_inherit
    ADD CONSTRAINT ir_model_inherit_pkey PRIMARY KEY (id);


--
-- Name: ir_model_inherit ir_model_inherit_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_inherit
    ADD CONSTRAINT ir_model_inherit_uniq UNIQUE (model_id, parent_id);


--
-- Name: CONSTRAINT ir_model_inherit_uniq ON ir_model_inherit; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_model_inherit_uniq ON public.ir_model_inherit IS 'UNIQUE(model_id, parent_id)';


--
-- Name: ir_model ir_model_obj_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model
    ADD CONSTRAINT ir_model_obj_name_uniq UNIQUE (model);


--
-- Name: CONSTRAINT ir_model_obj_name_uniq ON ir_model; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_model_obj_name_uniq ON public.ir_model IS 'unique (model)';


--
-- Name: ir_model ir_model_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model
    ADD CONSTRAINT ir_model_pkey PRIMARY KEY (id);


--
-- Name: ir_model_relation ir_model_relation_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_relation
    ADD CONSTRAINT ir_model_relation_pkey PRIMARY KEY (id);


--
-- Name: ir_model_spreadsheet_dashboard_rel ir_model_spreadsheet_dashboard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_model_spreadsheet_dashboard_rel
    ADD CONSTRAINT ir_model_spreadsheet_dashboard_rel_pkey PRIMARY KEY (spreadsheet_dashboard_id, ir_model_id);


--
-- Name: ir_module_category ir_module_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_module_category
    ADD CONSTRAINT ir_module_category_pkey PRIMARY KEY (id);


--
-- Name: ir_module_module_dependency ir_module_module_dependency_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_module_module_dependency
    ADD CONSTRAINT ir_module_module_dependency_pkey PRIMARY KEY (id);


--
-- Name: ir_module_module_exclusion ir_module_module_exclusion_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_module_module_exclusion
    ADD CONSTRAINT ir_module_module_exclusion_pkey PRIMARY KEY (id);


--
-- Name: ir_module_module ir_module_module_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_module_module
    ADD CONSTRAINT ir_module_module_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT ir_module_module_name_uniq ON ir_module_module; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_module_module_name_uniq ON public.ir_module_module IS 'UNIQUE (name)';


--
-- Name: ir_module_module ir_module_module_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_module_module
    ADD CONSTRAINT ir_module_module_pkey PRIMARY KEY (id);


--
-- Name: ir_profile ir_profile_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_profile
    ADD CONSTRAINT ir_profile_pkey PRIMARY KEY (id);


--
-- Name: ir_rule ir_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_rule
    ADD CONSTRAINT ir_rule_pkey PRIMARY KEY (id);


--
-- Name: ir_sequence_date_range ir_sequence_date_range_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_sequence_date_range
    ADD CONSTRAINT ir_sequence_date_range_pkey PRIMARY KEY (id);


--
-- Name: ir_sequence_date_range ir_sequence_date_range_unique_range_per_sequence; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_sequence_date_range
    ADD CONSTRAINT ir_sequence_date_range_unique_range_per_sequence UNIQUE (sequence_id, date_from, date_to);


--
-- Name: CONSTRAINT ir_sequence_date_range_unique_range_per_sequence ON ir_sequence_date_range; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT ir_sequence_date_range_unique_range_per_sequence ON public.ir_sequence_date_range IS 'UNIQUE(sequence_id, date_from, date_to)';


--
-- Name: ir_sequence ir_sequence_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_sequence
    ADD CONSTRAINT ir_sequence_pkey PRIMARY KEY (id);


--
-- Name: ir_ui_menu_group_rel ir_ui_menu_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_ui_menu_group_rel
    ADD CONSTRAINT ir_ui_menu_group_rel_pkey PRIMARY KEY (menu_id, gid);


--
-- Name: ir_ui_menu ir_ui_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_ui_menu
    ADD CONSTRAINT ir_ui_menu_pkey PRIMARY KEY (id);


--
-- Name: ir_ui_view_custom ir_ui_view_custom_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_ui_view_custom
    ADD CONSTRAINT ir_ui_view_custom_pkey PRIMARY KEY (id);


--
-- Name: ir_ui_view_group_rel ir_ui_view_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_ui_view_group_rel
    ADD CONSTRAINT ir_ui_view_group_rel_pkey PRIMARY KEY (view_id, group_id);


--
-- Name: ir_ui_view ir_ui_view_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_ui_view
    ADD CONSTRAINT ir_ui_view_pkey PRIMARY KEY (id);


--
-- Name: journal_account_control_rel journal_account_control_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.journal_account_control_rel
    ADD CONSTRAINT journal_account_control_rel_pkey PRIMARY KEY (journal_id, account_id);


--
-- Name: l10n_es_edi_facturae_ac_role_type l10n_es_edi_facturae_ac_role_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.l10n_es_edi_facturae_ac_role_type
    ADD CONSTRAINT l10n_es_edi_facturae_ac_role_type_pkey PRIMARY KEY (id);


--
-- Name: l10n_es_edi_facturae_ac_role_type_res_partner_rel l10n_es_edi_facturae_ac_role_type_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.l10n_es_edi_facturae_ac_role_type_res_partner_rel
    ADD CONSTRAINT l10n_es_edi_facturae_ac_role_type_res_partner_rel_pkey PRIMARY KEY (res_partner_id, l10n_es_edi_facturae_ac_role_type_id);


--
-- Name: link_tracker_click link_tracker_click_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.link_tracker_click
    ADD CONSTRAINT link_tracker_click_pkey PRIMARY KEY (id);


--
-- Name: link_tracker_code link_tracker_code_code; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.link_tracker_code
    ADD CONSTRAINT link_tracker_code_code UNIQUE (code);


--
-- Name: CONSTRAINT link_tracker_code_code ON link_tracker_code; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT link_tracker_code_code ON public.link_tracker_code IS 'unique( code )';


--
-- Name: link_tracker_code link_tracker_code_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.link_tracker_code
    ADD CONSTRAINT link_tracker_code_pkey PRIMARY KEY (id);


--
-- Name: link_tracker link_tracker_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.link_tracker
    ADD CONSTRAINT link_tracker_pkey PRIMARY KEY (id);


--
-- Name: lot_label_layout lot_label_layout_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.lot_label_layout
    ADD CONSTRAINT lot_label_layout_pkey PRIMARY KEY (id);


--
-- Name: lot_label_layout_stock_move_line_rel lot_label_layout_stock_move_line_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.lot_label_layout_stock_move_line_rel
    ADD CONSTRAINT lot_label_layout_stock_move_line_rel_pkey PRIMARY KEY (lot_label_layout_id, stock_move_line_id);


--
-- Name: mail_activity mail_activity_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity
    ADD CONSTRAINT mail_activity_pkey PRIMARY KEY (id);


--
-- Name: mail_activity_plan_mail_activity_schedule_rel mail_activity_plan_mail_activity_schedule_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_plan_mail_activity_schedule_rel
    ADD CONSTRAINT mail_activity_plan_mail_activity_schedule_rel_pkey PRIMARY KEY (mail_activity_schedule_id, mail_activity_plan_id);


--
-- Name: mail_activity_plan mail_activity_plan_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_plan
    ADD CONSTRAINT mail_activity_plan_pkey PRIMARY KEY (id);


--
-- Name: mail_activity_plan_template mail_activity_plan_template_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_plan_template
    ADD CONSTRAINT mail_activity_plan_template_pkey PRIMARY KEY (id);


--
-- Name: mail_activity_rel mail_activity_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_rel
    ADD CONSTRAINT mail_activity_rel_pkey PRIMARY KEY (activity_id, recommended_id);


--
-- Name: mail_activity_schedule mail_activity_schedule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_schedule
    ADD CONSTRAINT mail_activity_schedule_pkey PRIMARY KEY (id);


--
-- Name: mail_activity_type_mail_template_rel mail_activity_type_mail_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_type_mail_template_rel
    ADD CONSTRAINT mail_activity_type_mail_template_rel_pkey PRIMARY KEY (mail_activity_type_id, mail_template_id);


--
-- Name: mail_activity_type mail_activity_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_activity_type
    ADD CONSTRAINT mail_activity_type_pkey PRIMARY KEY (id);


--
-- Name: mail_alias_domain mail_alias_domain_bounce_email_uniques; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_alias_domain
    ADD CONSTRAINT mail_alias_domain_bounce_email_uniques UNIQUE (bounce_alias, name);


--
-- Name: CONSTRAINT mail_alias_domain_bounce_email_uniques ON mail_alias_domain; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_alias_domain_bounce_email_uniques ON public.mail_alias_domain IS 'UNIQUE(bounce_alias, name)';


--
-- Name: mail_alias_domain mail_alias_domain_catchall_email_uniques; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_alias_domain
    ADD CONSTRAINT mail_alias_domain_catchall_email_uniques UNIQUE (catchall_alias, name);


--
-- Name: CONSTRAINT mail_alias_domain_catchall_email_uniques ON mail_alias_domain; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_alias_domain_catchall_email_uniques ON public.mail_alias_domain IS 'UNIQUE(catchall_alias, name)';


--
-- Name: mail_alias_domain mail_alias_domain_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_alias_domain
    ADD CONSTRAINT mail_alias_domain_pkey PRIMARY KEY (id);


--
-- Name: mail_alias mail_alias_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_alias
    ADD CONSTRAINT mail_alias_pkey PRIMARY KEY (id);


--
-- Name: mail_blacklist mail_blacklist_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_blacklist
    ADD CONSTRAINT mail_blacklist_pkey PRIMARY KEY (id);


--
-- Name: mail_blacklist_remove mail_blacklist_remove_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_blacklist_remove
    ADD CONSTRAINT mail_blacklist_remove_pkey PRIMARY KEY (id);


--
-- Name: mail_blacklist mail_blacklist_unique_email; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_blacklist
    ADD CONSTRAINT mail_blacklist_unique_email UNIQUE (email);


--
-- Name: CONSTRAINT mail_blacklist_unique_email ON mail_blacklist; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_blacklist_unique_email ON public.mail_blacklist IS 'unique (email)';


--
-- Name: mail_canned_response mail_canned_response_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_canned_response
    ADD CONSTRAINT mail_canned_response_pkey PRIMARY KEY (id);


--
-- Name: mail_canned_response_res_groups_rel mail_canned_response_res_groups_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_canned_response_res_groups_rel
    ADD CONSTRAINT mail_canned_response_res_groups_rel_pkey PRIMARY KEY (mail_canned_response_id, res_groups_id);


--
-- Name: mail_compose_message_ir_attachments_rel mail_compose_message_ir_attachments_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_compose_message_ir_attachments_rel
    ADD CONSTRAINT mail_compose_message_ir_attachments_rel_pkey PRIMARY KEY (wizard_id, attachment_id);


--
-- Name: mail_compose_message mail_compose_message_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_compose_message
    ADD CONSTRAINT mail_compose_message_pkey PRIMARY KEY (id);


--
-- Name: mail_compose_message_res_partner_rel mail_compose_message_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_compose_message_res_partner_rel
    ADD CONSTRAINT mail_compose_message_res_partner_rel_pkey PRIMARY KEY (wizard_id, partner_id);


--
-- Name: mail_followers mail_followers_mail_followers_res_partner_res_model_id_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_followers
    ADD CONSTRAINT mail_followers_mail_followers_res_partner_res_model_id_uniq UNIQUE (res_model, res_id, partner_id);


--
-- Name: CONSTRAINT mail_followers_mail_followers_res_partner_res_model_id_uniq ON mail_followers; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_followers_mail_followers_res_partner_res_model_id_uniq ON public.mail_followers IS 'unique(res_model,res_id,partner_id)';


--
-- Name: mail_followers_mail_message_subtype_rel mail_followers_mail_message_subtype_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_followers_mail_message_subtype_rel
    ADD CONSTRAINT mail_followers_mail_message_subtype_rel_pkey PRIMARY KEY (mail_followers_id, mail_message_subtype_id);


--
-- Name: mail_followers mail_followers_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_followers
    ADD CONSTRAINT mail_followers_pkey PRIMARY KEY (id);


--
-- Name: mail_gateway_allowed mail_gateway_allowed_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_gateway_allowed
    ADD CONSTRAINT mail_gateway_allowed_pkey PRIMARY KEY (id);


--
-- Name: mail_guest mail_guest_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_guest
    ADD CONSTRAINT mail_guest_pkey PRIMARY KEY (id);


--
-- Name: mail_ice_server mail_ice_server_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_ice_server
    ADD CONSTRAINT mail_ice_server_pkey PRIMARY KEY (id);


--
-- Name: mail_link_preview mail_link_preview_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_link_preview
    ADD CONSTRAINT mail_link_preview_pkey PRIMARY KEY (id);


--
-- Name: mail_mail mail_mail_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_mail
    ADD CONSTRAINT mail_mail_pkey PRIMARY KEY (id);


--
-- Name: mail_mail_res_partner_rel mail_mail_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_mail_res_partner_rel
    ADD CONSTRAINT mail_mail_res_partner_rel_pkey PRIMARY KEY (mail_mail_id, res_partner_id);


--
-- Name: mail_message mail_message_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message
    ADD CONSTRAINT mail_message_pkey PRIMARY KEY (id);


--
-- Name: mail_message_reaction mail_message_reaction_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_reaction
    ADD CONSTRAINT mail_message_reaction_pkey PRIMARY KEY (id);


--
-- Name: mail_message_res_partner_rel mail_message_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_res_partner_rel
    ADD CONSTRAINT mail_message_res_partner_rel_pkey PRIMARY KEY (mail_message_id, res_partner_id);


--
-- Name: mail_message_res_partner_starred_rel mail_message_res_partner_starred_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_res_partner_starred_rel
    ADD CONSTRAINT mail_message_res_partner_starred_rel_pkey PRIMARY KEY (mail_message_id, res_partner_id);


--
-- Name: mail_message_schedule mail_message_schedule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_schedule
    ADD CONSTRAINT mail_message_schedule_pkey PRIMARY KEY (id);


--
-- Name: mail_message_subtype mail_message_subtype_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_subtype
    ADD CONSTRAINT mail_message_subtype_pkey PRIMARY KEY (id);


--
-- Name: mail_message_translation mail_message_translation_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_message_translation
    ADD CONSTRAINT mail_message_translation_pkey PRIMARY KEY (id);


--
-- Name: mail_notification_mail_resend_message_rel mail_notification_mail_resend_message_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_notification_mail_resend_message_rel
    ADD CONSTRAINT mail_notification_mail_resend_message_rel_pkey PRIMARY KEY (mail_resend_message_id, mail_notification_id);


--
-- Name: mail_notification mail_notification_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_notification
    ADD CONSTRAINT mail_notification_pkey PRIMARY KEY (id);


--
-- Name: mail_push_device mail_push_device_endpoint_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_push_device
    ADD CONSTRAINT mail_push_device_endpoint_unique UNIQUE (endpoint);


--
-- Name: CONSTRAINT mail_push_device_endpoint_unique ON mail_push_device; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_push_device_endpoint_unique ON public.mail_push_device IS 'unique(endpoint)';


--
-- Name: mail_push_device mail_push_device_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_push_device
    ADD CONSTRAINT mail_push_device_pkey PRIMARY KEY (id);


--
-- Name: mail_push mail_push_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_push
    ADD CONSTRAINT mail_push_pkey PRIMARY KEY (id);


--
-- Name: mail_resend_message mail_resend_message_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_resend_message
    ADD CONSTRAINT mail_resend_message_pkey PRIMARY KEY (id);


--
-- Name: mail_resend_partner mail_resend_partner_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_resend_partner
    ADD CONSTRAINT mail_resend_partner_pkey PRIMARY KEY (id);


--
-- Name: mail_scheduled_message mail_scheduled_message_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_scheduled_message
    ADD CONSTRAINT mail_scheduled_message_pkey PRIMARY KEY (id);


--
-- Name: mail_scheduled_message_res_partner_rel mail_scheduled_message_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_scheduled_message_res_partner_rel
    ADD CONSTRAINT mail_scheduled_message_res_partner_rel_pkey PRIMARY KEY (mail_scheduled_message_id, res_partner_id);


--
-- Name: mail_template_ir_actions_report_rel mail_template_ir_actions_report_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_template_ir_actions_report_rel
    ADD CONSTRAINT mail_template_ir_actions_report_rel_pkey PRIMARY KEY (mail_template_id, ir_actions_report_id);


--
-- Name: mail_template_mail_template_reset_rel mail_template_mail_template_reset_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_template_mail_template_reset_rel
    ADD CONSTRAINT mail_template_mail_template_reset_rel_pkey PRIMARY KEY (mail_template_reset_id, mail_template_id);


--
-- Name: mail_template mail_template_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_template
    ADD CONSTRAINT mail_template_pkey PRIMARY KEY (id);


--
-- Name: mail_template_preview mail_template_preview_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_template_preview
    ADD CONSTRAINT mail_template_preview_pkey PRIMARY KEY (id);


--
-- Name: mail_template_reset mail_template_reset_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_template_reset
    ADD CONSTRAINT mail_template_reset_pkey PRIMARY KEY (id);


--
-- Name: mail_tracking_value mail_tracking_value_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_tracking_value
    ADD CONSTRAINT mail_tracking_value_pkey PRIMARY KEY (id);


--
-- Name: mail_wizard_invite mail_wizard_invite_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_wizard_invite
    ADD CONSTRAINT mail_wizard_invite_pkey PRIMARY KEY (id);


--
-- Name: mail_wizard_invite_res_partner_rel mail_wizard_invite_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_wizard_invite_res_partner_rel
    ADD CONSTRAINT mail_wizard_invite_res_partner_rel_pkey PRIMARY KEY (mail_wizard_invite_id, res_partner_id);


--
-- Name: maintenance_equipment_category maintenance_equipment_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_equipment_category
    ADD CONSTRAINT maintenance_equipment_category_pkey PRIMARY KEY (id);


--
-- Name: maintenance_equipment maintenance_equipment_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_equipment
    ADD CONSTRAINT maintenance_equipment_pkey PRIMARY KEY (id);


--
-- Name: maintenance_equipment maintenance_equipment_serial_no; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_equipment
    ADD CONSTRAINT maintenance_equipment_serial_no UNIQUE (serial_no);


--
-- Name: CONSTRAINT maintenance_equipment_serial_no ON maintenance_equipment; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT maintenance_equipment_serial_no ON public.maintenance_equipment IS 'unique(serial_no)';


--
-- Name: maintenance_request maintenance_request_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_request
    ADD CONSTRAINT maintenance_request_pkey PRIMARY KEY (id);


--
-- Name: maintenance_stage maintenance_stage_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_stage
    ADD CONSTRAINT maintenance_stage_pkey PRIMARY KEY (id);


--
-- Name: maintenance_team maintenance_team_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_team
    ADD CONSTRAINT maintenance_team_pkey PRIMARY KEY (id);


--
-- Name: maintenance_team_users_rel maintenance_team_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.maintenance_team_users_rel
    ADD CONSTRAINT maintenance_team_users_rel_pkey PRIMARY KEY (maintenance_team_id, res_users_id);


--
-- Name: meeting_category_rel meeting_category_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.meeting_category_rel
    ADD CONSTRAINT meeting_category_rel_pkey PRIMARY KEY (event_id, type_id);


--
-- Name: merge_opportunity_rel merge_opportunity_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.merge_opportunity_rel
    ADD CONSTRAINT merge_opportunity_rel_pkey PRIMARY KEY (merge_id, opportunity_id);


--
-- Name: message_attachment_rel message_attachment_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.message_attachment_rel
    ADD CONSTRAINT message_attachment_rel_pkey PRIMARY KEY (message_id, attachment_id);


--
-- Name: module_country module_country_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.module_country
    ADD CONSTRAINT module_country_pkey PRIMARY KEY (module_id, country_id);


--
-- Name: mrp_account_wip_accounting_line mrp_account_wip_accounting_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_account_wip_accounting_line
    ADD CONSTRAINT mrp_account_wip_accounting_line_pkey PRIMARY KEY (id);


--
-- Name: mrp_account_wip_accounting_mrp_production_rel mrp_account_wip_accounting_mrp_production_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_account_wip_accounting_mrp_production_rel
    ADD CONSTRAINT mrp_account_wip_accounting_mrp_production_rel_pkey PRIMARY KEY (mrp_account_wip_accounting_id, mrp_production_id);


--
-- Name: mrp_account_wip_accounting mrp_account_wip_accounting_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_account_wip_accounting
    ADD CONSTRAINT mrp_account_wip_accounting_pkey PRIMARY KEY (id);


--
-- Name: mrp_batch_produce mrp_batch_produce_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_batch_produce
    ADD CONSTRAINT mrp_batch_produce_pkey PRIMARY KEY (id);


--
-- Name: mrp_bom_byproduct mrp_bom_byproduct_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_bom_byproduct
    ADD CONSTRAINT mrp_bom_byproduct_pkey PRIMARY KEY (id);


--
-- Name: mrp_bom_byproduct_product_template_attribute_value_rel mrp_bom_byproduct_product_template_attribute_value_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_bom_byproduct_product_template_attribute_value_rel
    ADD CONSTRAINT mrp_bom_byproduct_product_template_attribute_value_rel_pkey PRIMARY KEY (mrp_bom_byproduct_id, product_template_attribute_value_id);


--
-- Name: mrp_bom_line mrp_bom_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_bom_line
    ADD CONSTRAINT mrp_bom_line_pkey PRIMARY KEY (id);


--
-- Name: mrp_bom_line_product_template_attribute_value_rel mrp_bom_line_product_template_attribute_value_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_bom_line_product_template_attribute_value_rel
    ADD CONSTRAINT mrp_bom_line_product_template_attribute_value_rel_pkey PRIMARY KEY (mrp_bom_line_id, product_template_attribute_value_id);


--
-- Name: mrp_bom mrp_bom_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_bom
    ADD CONSTRAINT mrp_bom_pkey PRIMARY KEY (id);


--
-- Name: mrp_consumption_warning_line mrp_consumption_warning_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_consumption_warning_line
    ADD CONSTRAINT mrp_consumption_warning_line_pkey PRIMARY KEY (id);


--
-- Name: mrp_consumption_warning_mrp_production_rel mrp_consumption_warning_mrp_production_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_consumption_warning_mrp_production_rel
    ADD CONSTRAINT mrp_consumption_warning_mrp_production_rel_pkey PRIMARY KEY (mrp_consumption_warning_id, mrp_production_id);


--
-- Name: mrp_consumption_warning mrp_consumption_warning_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_consumption_warning
    ADD CONSTRAINT mrp_consumption_warning_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_backorder_line mrp_production_backorder_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_backorder_line
    ADD CONSTRAINT mrp_production_backorder_line_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_backorder mrp_production_backorder_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_backorder
    ADD CONSTRAINT mrp_production_backorder_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_mrp_production_backorder_rel mrp_production_mrp_production_backorder_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_mrp_production_backorder_rel
    ADD CONSTRAINT mrp_production_mrp_production_backorder_rel_pkey PRIMARY KEY (mrp_production_backorder_id, mrp_production_id);


--
-- Name: mrp_production mrp_production_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production
    ADD CONSTRAINT mrp_production_name_uniq UNIQUE (name, company_id);


--
-- Name: CONSTRAINT mrp_production_name_uniq ON mrp_production; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mrp_production_name_uniq ON public.mrp_production IS 'unique(name, company_id)';


--
-- Name: mrp_production_picking_label_type_rel mrp_production_picking_label_type_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_picking_label_type_rel
    ADD CONSTRAINT mrp_production_picking_label_type_rel_pkey PRIMARY KEY (picking_label_type_id, mrp_production_id);


--
-- Name: mrp_production mrp_production_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production
    ADD CONSTRAINT mrp_production_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_split_line mrp_production_split_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_split_line
    ADD CONSTRAINT mrp_production_split_line_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_split_multi mrp_production_split_multi_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_split_multi
    ADD CONSTRAINT mrp_production_split_multi_pkey PRIMARY KEY (id);


--
-- Name: mrp_production_split mrp_production_split_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_production_split
    ADD CONSTRAINT mrp_production_split_pkey PRIMARY KEY (id);


--
-- Name: mrp_routing_workcenter_dependencies_rel mrp_routing_workcenter_dependencies_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_routing_workcenter_dependencies_rel
    ADD CONSTRAINT mrp_routing_workcenter_dependencies_rel_pkey PRIMARY KEY (operation_id, blocked_by_id);


--
-- Name: mrp_routing_workcenter mrp_routing_workcenter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_routing_workcenter
    ADD CONSTRAINT mrp_routing_workcenter_pkey PRIMARY KEY (id);


--
-- Name: mrp_routing_workcenter_product_template_attribute_value_rel mrp_routing_workcenter_product_template_attribute_value_re_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_routing_workcenter_product_template_attribute_value_rel
    ADD CONSTRAINT mrp_routing_workcenter_product_template_attribute_value_re_pkey PRIMARY KEY (mrp_routing_workcenter_id, product_template_attribute_value_id);


--
-- Name: mrp_unbuild mrp_unbuild_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_unbuild
    ADD CONSTRAINT mrp_unbuild_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_alternative_rel mrp_workcenter_alternative_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_alternative_rel
    ADD CONSTRAINT mrp_workcenter_alternative_rel_pkey PRIMARY KEY (workcenter_id, alternative_workcenter_id);


--
-- Name: mrp_workcenter_capacity mrp_workcenter_capacity_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_capacity
    ADD CONSTRAINT mrp_workcenter_capacity_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_capacity mrp_workcenter_capacity_unique_product; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_capacity
    ADD CONSTRAINT mrp_workcenter_capacity_unique_product UNIQUE (workcenter_id, product_id);


--
-- Name: CONSTRAINT mrp_workcenter_capacity_unique_product ON mrp_workcenter_capacity; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mrp_workcenter_capacity_unique_product ON public.mrp_workcenter_capacity IS 'UNIQUE(workcenter_id, product_id)';


--
-- Name: mrp_workcenter_mrp_workcenter_tag_rel mrp_workcenter_mrp_workcenter_tag_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_mrp_workcenter_tag_rel
    ADD CONSTRAINT mrp_workcenter_mrp_workcenter_tag_rel_pkey PRIMARY KEY (mrp_workcenter_id, mrp_workcenter_tag_id);


--
-- Name: mrp_workcenter mrp_workcenter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter
    ADD CONSTRAINT mrp_workcenter_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_productivity_loss mrp_workcenter_productivity_loss_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_productivity_loss
    ADD CONSTRAINT mrp_workcenter_productivity_loss_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_productivity_loss_type mrp_workcenter_productivity_loss_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_productivity_loss_type
    ADD CONSTRAINT mrp_workcenter_productivity_loss_type_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_productivity mrp_workcenter_productivity_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_productivity
    ADD CONSTRAINT mrp_workcenter_productivity_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_tag mrp_workcenter_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_tag
    ADD CONSTRAINT mrp_workcenter_tag_pkey PRIMARY KEY (id);


--
-- Name: mrp_workcenter_tag mrp_workcenter_tag_tag_name_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workcenter_tag
    ADD CONSTRAINT mrp_workcenter_tag_tag_name_unique UNIQUE (name);


--
-- Name: CONSTRAINT mrp_workcenter_tag_tag_name_unique ON mrp_workcenter_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mrp_workcenter_tag_tag_name_unique ON public.mrp_workcenter_tag IS 'unique(name)';


--
-- Name: mrp_workorder_dependencies_rel mrp_workorder_dependencies_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workorder_dependencies_rel
    ADD CONSTRAINT mrp_workorder_dependencies_rel_pkey PRIMARY KEY (workorder_id, blocked_by_id);


--
-- Name: mrp_workorder_mo_analytic_rel mrp_workorder_mo_analytic_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workorder_mo_analytic_rel
    ADD CONSTRAINT mrp_workorder_mo_analytic_rel_pkey PRIMARY KEY (mrp_workorder_id, account_analytic_line_id);


--
-- Name: mrp_workorder mrp_workorder_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workorder
    ADD CONSTRAINT mrp_workorder_pkey PRIMARY KEY (id);


--
-- Name: mrp_workorder_wc_analytic_rel mrp_workorder_wc_analytic_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mrp_workorder_wc_analytic_rel
    ADD CONSTRAINT mrp_workorder_wc_analytic_rel_pkey PRIMARY KEY (mrp_workorder_id, account_analytic_line_id);


--
-- Name: onboarding_onboarding_onboarding_onboarding_step_rel onboarding_onboarding_onboarding_onboarding_step_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_onboarding_onboarding_onboarding_step_rel
    ADD CONSTRAINT onboarding_onboarding_onboarding_onboarding_step_rel_pkey PRIMARY KEY (onboarding_onboarding_id, onboarding_onboarding_step_id);


--
-- Name: onboarding_onboarding onboarding_onboarding_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_onboarding
    ADD CONSTRAINT onboarding_onboarding_pkey PRIMARY KEY (id);


--
-- Name: onboarding_onboarding onboarding_onboarding_route_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_onboarding
    ADD CONSTRAINT onboarding_onboarding_route_name_uniq UNIQUE (route_name);


--
-- Name: CONSTRAINT onboarding_onboarding_route_name_uniq ON onboarding_onboarding; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT onboarding_onboarding_route_name_uniq ON public.onboarding_onboarding IS 'UNIQUE (route_name)';


--
-- Name: onboarding_onboarding_step onboarding_onboarding_step_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_onboarding_step
    ADD CONSTRAINT onboarding_onboarding_step_pkey PRIMARY KEY (id);


--
-- Name: onboarding_progress_onboarding_progress_step_rel onboarding_progress_onboarding_progress_step_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_progress_onboarding_progress_step_rel
    ADD CONSTRAINT onboarding_progress_onboarding_progress_step_rel_pkey PRIMARY KEY (onboarding_progress_id, onboarding_progress_step_id);


--
-- Name: onboarding_progress onboarding_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_progress
    ADD CONSTRAINT onboarding_progress_pkey PRIMARY KEY (id);


--
-- Name: onboarding_progress_step onboarding_progress_step_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.onboarding_progress_step
    ADD CONSTRAINT onboarding_progress_step_pkey PRIMARY KEY (id);


--
-- Name: payment_capture_wizard_payment_transaction_rel payment_capture_wizard_payment_transaction_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_capture_wizard_payment_transaction_rel
    ADD CONSTRAINT payment_capture_wizard_payment_transaction_rel_pkey PRIMARY KEY (payment_capture_wizard_id, payment_transaction_id);


--
-- Name: payment_capture_wizard payment_capture_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_capture_wizard
    ADD CONSTRAINT payment_capture_wizard_pkey PRIMARY KEY (id);


--
-- Name: payment_country_rel payment_country_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_country_rel
    ADD CONSTRAINT payment_country_rel_pkey PRIMARY KEY (payment_id, country_id);


--
-- Name: payment_currency_rel payment_currency_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_currency_rel
    ADD CONSTRAINT payment_currency_rel_pkey PRIMARY KEY (payment_provider_id, currency_id);


--
-- Name: payment_link_wizard payment_link_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_link_wizard
    ADD CONSTRAINT payment_link_wizard_pkey PRIMARY KEY (id);


--
-- Name: payment_method_payment_provider_rel payment_method_payment_provider_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_method_payment_provider_rel
    ADD CONSTRAINT payment_method_payment_provider_rel_pkey PRIMARY KEY (payment_method_id, payment_provider_id);


--
-- Name: payment_method payment_method_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_method
    ADD CONSTRAINT payment_method_pkey PRIMARY KEY (id);


--
-- Name: payment_method_res_country_rel payment_method_res_country_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_method_res_country_rel
    ADD CONSTRAINT payment_method_res_country_rel_pkey PRIMARY KEY (payment_method_id, res_country_id);


--
-- Name: payment_method_res_currency_rel payment_method_res_currency_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_method_res_currency_rel
    ADD CONSTRAINT payment_method_res_currency_rel_pkey PRIMARY KEY (payment_method_id, res_currency_id);


--
-- Name: payment_provider_onboarding_wizard payment_provider_onboarding_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_provider_onboarding_wizard
    ADD CONSTRAINT payment_provider_onboarding_wizard_pkey PRIMARY KEY (id);


--
-- Name: payment_provider payment_provider_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_provider
    ADD CONSTRAINT payment_provider_pkey PRIMARY KEY (id);


--
-- Name: payment_refund_wizard payment_refund_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_refund_wizard
    ADD CONSTRAINT payment_refund_wizard_pkey PRIMARY KEY (id);


--
-- Name: payment_token payment_token_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_token
    ADD CONSTRAINT payment_token_pkey PRIMARY KEY (id);


--
-- Name: payment_transaction payment_transaction_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_transaction
    ADD CONSTRAINT payment_transaction_pkey PRIMARY KEY (id);


--
-- Name: payment_transaction payment_transaction_reference_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_transaction
    ADD CONSTRAINT payment_transaction_reference_uniq UNIQUE (reference);


--
-- Name: CONSTRAINT payment_transaction_reference_uniq ON payment_transaction; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT payment_transaction_reference_uniq ON public.payment_transaction IS 'unique(reference)';


--
-- Name: peppol_registration peppol_registration_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.peppol_registration
    ADD CONSTRAINT peppol_registration_pkey PRIMARY KEY (id);


--
-- Name: phone_blacklist phone_blacklist_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.phone_blacklist
    ADD CONSTRAINT phone_blacklist_pkey PRIMARY KEY (id);


--
-- Name: phone_blacklist_remove phone_blacklist_remove_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.phone_blacklist_remove
    ADD CONSTRAINT phone_blacklist_remove_pkey PRIMARY KEY (id);


--
-- Name: phone_blacklist phone_blacklist_unique_number; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.phone_blacklist
    ADD CONSTRAINT phone_blacklist_unique_number UNIQUE (number);


--
-- Name: CONSTRAINT phone_blacklist_unique_number ON phone_blacklist; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT phone_blacklist_unique_number ON public.phone_blacklist IS 'unique (number)';


--
-- Name: picking_label_type picking_label_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.picking_label_type
    ADD CONSTRAINT picking_label_type_pkey PRIMARY KEY (id);


--
-- Name: picking_label_type_stock_picking_rel picking_label_type_stock_picking_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.picking_label_type_stock_picking_rel
    ADD CONSTRAINT picking_label_type_stock_picking_rel_pkey PRIMARY KEY (picking_label_type_id, stock_picking_id);


--
-- Name: picking_type_favorite_user_rel picking_type_favorite_user_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.picking_type_favorite_user_rel
    ADD CONSTRAINT picking_type_favorite_user_rel_pkey PRIMARY KEY (picking_type_id, user_id);


--
-- Name: portal_share portal_share_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.portal_share
    ADD CONSTRAINT portal_share_pkey PRIMARY KEY (id);


--
-- Name: portal_share_res_partner_rel portal_share_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.portal_share_res_partner_rel
    ADD CONSTRAINT portal_share_res_partner_rel_pkey PRIMARY KEY (portal_share_id, res_partner_id);


--
-- Name: portal_wizard portal_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.portal_wizard
    ADD CONSTRAINT portal_wizard_pkey PRIMARY KEY (id);


--
-- Name: portal_wizard_res_partner_rel portal_wizard_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.portal_wizard_res_partner_rel
    ADD CONSTRAINT portal_wizard_res_partner_rel_pkey PRIMARY KEY (portal_wizard_id, res_partner_id);


--
-- Name: portal_wizard_user portal_wizard_user_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.portal_wizard_user
    ADD CONSTRAINT portal_wizard_user_pkey PRIMARY KEY (id);


--
-- Name: privacy_log privacy_log_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.privacy_log
    ADD CONSTRAINT privacy_log_pkey PRIMARY KEY (id);


--
-- Name: privacy_lookup_wizard_line privacy_lookup_wizard_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.privacy_lookup_wizard_line
    ADD CONSTRAINT privacy_lookup_wizard_line_pkey PRIMARY KEY (id);


--
-- Name: privacy_lookup_wizard privacy_lookup_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.privacy_lookup_wizard
    ADD CONSTRAINT privacy_lookup_wizard_pkey PRIMARY KEY (id);


--
-- Name: procurement_group procurement_group_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.procurement_group
    ADD CONSTRAINT procurement_group_pkey PRIMARY KEY (id);


--
-- Name: product_attr_exclusion_value_ids_rel product_attr_exclusion_value_ids_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attr_exclusion_value_ids_rel
    ADD CONSTRAINT product_attr_exclusion_value_ids_rel_pkey PRIMARY KEY (product_template_attribute_exclusion_id, product_template_attribute_value_id);


--
-- Name: product_attribute_custom_value product_attribute_custom_value_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_custom_value
    ADD CONSTRAINT product_attribute_custom_value_pkey PRIMARY KEY (id);


--
-- Name: product_attribute_custom_value product_attribute_custom_value_sol_custom_value_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_custom_value
    ADD CONSTRAINT product_attribute_custom_value_sol_custom_value_unique UNIQUE (custom_product_template_attribute_value_id, sale_order_line_id);


--
-- Name: CONSTRAINT product_attribute_custom_value_sol_custom_value_unique ON product_attribute_custom_value; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT product_attribute_custom_value_sol_custom_value_unique ON public.product_attribute_custom_value IS 'unique(custom_product_template_attribute_value_id, sale_order_line_id)';


--
-- Name: product_attribute product_attribute_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute
    ADD CONSTRAINT product_attribute_pkey PRIMARY KEY (id);


--
-- Name: product_attribute_product_template_rel product_attribute_product_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_product_template_rel
    ADD CONSTRAINT product_attribute_product_template_rel_pkey PRIMARY KEY (product_attribute_id, product_template_id);


--
-- Name: product_attribute_value product_attribute_value_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_value
    ADD CONSTRAINT product_attribute_value_pkey PRIMARY KEY (id);


--
-- Name: product_attribute_value_product_template_attribute_line_rel product_attribute_value_product_template_attribute_line_re_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_value_product_template_attribute_line_rel
    ADD CONSTRAINT product_attribute_value_product_template_attribute_line_re_pkey PRIMARY KEY (product_attribute_value_id, product_template_attribute_line_id);


--
-- Name: product_category product_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_category
    ADD CONSTRAINT product_category_pkey PRIMARY KEY (id);


--
-- Name: product_combo_item product_combo_item_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_combo_item
    ADD CONSTRAINT product_combo_item_pkey PRIMARY KEY (id);


--
-- Name: product_combo product_combo_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_combo
    ADD CONSTRAINT product_combo_pkey PRIMARY KEY (id);


--
-- Name: product_combo_product_template_rel product_combo_product_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_combo_product_template_rel
    ADD CONSTRAINT product_combo_product_template_rel_pkey PRIMARY KEY (product_template_id, product_combo_id);


--
-- Name: product_document product_document_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_document
    ADD CONSTRAINT product_document_pkey PRIMARY KEY (id);


--
-- Name: product_document_sale_pdf_form_field_rel product_document_sale_pdf_form_field_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_document_sale_pdf_form_field_rel
    ADD CONSTRAINT product_document_sale_pdf_form_field_rel_pkey PRIMARY KEY (product_document_id, sale_pdf_form_field_id);


--
-- Name: product_label_layout product_label_layout_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_label_layout
    ADD CONSTRAINT product_label_layout_pkey PRIMARY KEY (id);


--
-- Name: product_label_layout_product_product_rel product_label_layout_product_product_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_label_layout_product_product_rel
    ADD CONSTRAINT product_label_layout_product_product_rel_pkey PRIMARY KEY (product_label_layout_id, product_product_id);


--
-- Name: product_label_layout_product_template_rel product_label_layout_product_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_label_layout_product_template_rel
    ADD CONSTRAINT product_label_layout_product_template_rel_pkey PRIMARY KEY (product_label_layout_id, product_template_id);


--
-- Name: product_label_layout_stock_move_rel product_label_layout_stock_move_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_label_layout_stock_move_rel
    ADD CONSTRAINT product_label_layout_stock_move_rel_pkey PRIMARY KEY (product_label_layout_id, stock_move_id);


--
-- Name: product_optional_rel product_optional_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_optional_rel
    ADD CONSTRAINT product_optional_rel_pkey PRIMARY KEY (src_id, dest_id);


--
-- Name: product_packaging product_packaging_barcode_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_packaging
    ADD CONSTRAINT product_packaging_barcode_uniq UNIQUE (barcode);


--
-- Name: CONSTRAINT product_packaging_barcode_uniq ON product_packaging; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT product_packaging_barcode_uniq ON public.product_packaging IS 'unique(barcode)';


--
-- Name: product_packaging product_packaging_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_packaging
    ADD CONSTRAINT product_packaging_pkey PRIMARY KEY (id);


--
-- Name: product_pricelist_item product_pricelist_item_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_pricelist_item
    ADD CONSTRAINT product_pricelist_item_pkey PRIMARY KEY (id);


--
-- Name: product_pricelist product_pricelist_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_pricelist
    ADD CONSTRAINT product_pricelist_pkey PRIMARY KEY (id);


--
-- Name: product_product product_product_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_product
    ADD CONSTRAINT product_product_pkey PRIMARY KEY (id);


--
-- Name: product_product_stock_track_confirmation_rel product_product_stock_track_confirmation_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_product_stock_track_confirmation_rel
    ADD CONSTRAINT product_product_stock_track_confirmation_rel_pkey PRIMARY KEY (stock_track_confirmation_id, product_product_id);


--
-- Name: product_removal product_removal_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_removal
    ADD CONSTRAINT product_removal_pkey PRIMARY KEY (id);


--
-- Name: product_replenish product_replenish_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_replenish
    ADD CONSTRAINT product_replenish_pkey PRIMARY KEY (id);


--
-- Name: product_supplier_taxes_rel product_supplier_taxes_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_supplier_taxes_rel
    ADD CONSTRAINT product_supplier_taxes_rel_pkey PRIMARY KEY (prod_id, tax_id);


--
-- Name: product_supplierinfo product_supplierinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_supplierinfo
    ADD CONSTRAINT product_supplierinfo_pkey PRIMARY KEY (id);


--
-- Name: product_supplierinfo_stock_replenishment_info_rel product_supplierinfo_stock_replenishment_info_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_supplierinfo_stock_replenishment_info_rel
    ADD CONSTRAINT product_supplierinfo_stock_replenishment_info_rel_pkey PRIMARY KEY (stock_replenishment_info_id, product_supplierinfo_id);


--
-- Name: product_tag product_tag_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_tag
    ADD CONSTRAINT product_tag_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT product_tag_name_uniq ON product_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT product_tag_name_uniq ON public.product_tag IS 'unique (name)';


--
-- Name: product_tag product_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_tag
    ADD CONSTRAINT product_tag_pkey PRIMARY KEY (id);


--
-- Name: product_tag_product_product_rel product_tag_product_product_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_tag_product_product_rel
    ADD CONSTRAINT product_tag_product_product_rel_pkey PRIMARY KEY (product_product_id, product_tag_id);


--
-- Name: product_tag_product_template_rel product_tag_product_template_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_tag_product_template_rel
    ADD CONSTRAINT product_tag_product_template_rel_pkey PRIMARY KEY (product_template_id, product_tag_id);


--
-- Name: product_taxes_rel product_taxes_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_taxes_rel
    ADD CONSTRAINT product_taxes_rel_pkey PRIMARY KEY (prod_id, tax_id);


--
-- Name: product_template_attribute_exclusion product_template_attribute_exclusion_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_exclusion
    ADD CONSTRAINT product_template_attribute_exclusion_pkey PRIMARY KEY (id);


--
-- Name: product_template_attribute_line product_template_attribute_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_line
    ADD CONSTRAINT product_template_attribute_line_pkey PRIMARY KEY (id);


--
-- Name: product_template_attribute_value product_template_attribute_value_attribute_value_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_value
    ADD CONSTRAINT product_template_attribute_value_attribute_value_unique UNIQUE (attribute_line_id, product_attribute_value_id);


--
-- Name: CONSTRAINT product_template_attribute_value_attribute_value_unique ON product_template_attribute_value; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT product_template_attribute_value_attribute_value_unique ON public.product_template_attribute_value IS 'unique(attribute_line_id, product_attribute_value_id)';


--
-- Name: product_template_attribute_value product_template_attribute_value_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_value
    ADD CONSTRAINT product_template_attribute_value_pkey PRIMARY KEY (id);


--
-- Name: product_template_attribute_value_purchase_order_line_rel product_template_attribute_value_purchase_order_line_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_value_purchase_order_line_rel
    ADD CONSTRAINT product_template_attribute_value_purchase_order_line_rel_pkey PRIMARY KEY (purchase_order_line_id, product_template_attribute_value_id);


--
-- Name: product_template_attribute_value_sale_order_line_rel product_template_attribute_value_sale_order_line_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template_attribute_value_sale_order_line_rel
    ADD CONSTRAINT product_template_attribute_value_sale_order_line_rel_pkey PRIMARY KEY (sale_order_line_id, product_template_attribute_value_id);


--
-- Name: product_template product_template_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_template
    ADD CONSTRAINT product_template_pkey PRIMARY KEY (id);


--
-- Name: product_variant_combination product_variant_combination_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_variant_combination
    ADD CONSTRAINT product_variant_combination_pkey PRIMARY KEY (product_product_id, product_template_attribute_value_id);


--
-- Name: project_collaborator project_collaborator_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_collaborator
    ADD CONSTRAINT project_collaborator_pkey PRIMARY KEY (id);


--
-- Name: project_collaborator project_collaborator_unique_collaborator; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_collaborator
    ADD CONSTRAINT project_collaborator_unique_collaborator UNIQUE (project_id, partner_id);


--
-- Name: CONSTRAINT project_collaborator_unique_collaborator ON project_collaborator; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT project_collaborator_unique_collaborator ON public.project_collaborator IS 'UNIQUE(project_id, partner_id)';


--
-- Name: project_favorite_user_rel project_favorite_user_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_favorite_user_rel
    ADD CONSTRAINT project_favorite_user_rel_pkey PRIMARY KEY (project_id, user_id);


--
-- Name: project_milestone project_milestone_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_milestone
    ADD CONSTRAINT project_milestone_pkey PRIMARY KEY (id);


--
-- Name: project_project project_project_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project
    ADD CONSTRAINT project_project_pkey PRIMARY KEY (id);


--
-- Name: project_project_project_tags_rel project_project_project_tags_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project_project_tags_rel
    ADD CONSTRAINT project_project_project_tags_rel_pkey PRIMARY KEY (project_project_id, project_tags_id);


--
-- Name: project_project_project_task_type_delete_wizard_rel project_project_project_task_type_delete_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project_project_task_type_delete_wizard_rel
    ADD CONSTRAINT project_project_project_task_type_delete_wizard_rel_pkey PRIMARY KEY (project_task_type_delete_wizard_id, project_project_id);


--
-- Name: project_project_stage_delete_wizard project_project_stage_delete_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project_stage_delete_wizard
    ADD CONSTRAINT project_project_stage_delete_wizard_pkey PRIMARY KEY (id);


--
-- Name: project_project_stage project_project_stage_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project_stage
    ADD CONSTRAINT project_project_stage_pkey PRIMARY KEY (id);


--
-- Name: project_project_stage_project_project_stage_delete_wizard_rel project_project_stage_project_project_stage_delete_wizard__pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_project_stage_project_project_stage_delete_wizard_rel
    ADD CONSTRAINT project_project_stage_project_project_stage_delete_wizard__pkey PRIMARY KEY (project_project_stage_delete_wizard_id, project_project_stage_id);


--
-- Name: project_share_collaborator_wizard project_share_collaborator_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_share_collaborator_wizard
    ADD CONSTRAINT project_share_collaborator_wizard_pkey PRIMARY KEY (id);


--
-- Name: project_share_wizard project_share_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_share_wizard
    ADD CONSTRAINT project_share_wizard_pkey PRIMARY KEY (id);


--
-- Name: project_share_wizard_res_partner_rel project_share_wizard_res_partner_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_share_wizard_res_partner_rel
    ADD CONSTRAINT project_share_wizard_res_partner_rel_pkey PRIMARY KEY (project_share_wizard_id, res_partner_id);


--
-- Name: project_tags project_tags_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_tags
    ADD CONSTRAINT project_tags_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT project_tags_name_uniq ON project_tags; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT project_tags_name_uniq ON public.project_tags IS 'unique (name)';


--
-- Name: project_tags project_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_tags
    ADD CONSTRAINT project_tags_pkey PRIMARY KEY (id);


--
-- Name: project_tags_project_task_rel project_tags_project_task_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_tags_project_task_rel
    ADD CONSTRAINT project_tags_project_task_rel_pkey PRIMARY KEY (project_task_id, project_tags_id);


--
-- Name: project_task project_task_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task
    ADD CONSTRAINT project_task_pkey PRIMARY KEY (id);


--
-- Name: project_task_recurrence project_task_recurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_recurrence
    ADD CONSTRAINT project_task_recurrence_pkey PRIMARY KEY (id);


--
-- Name: project_task_type_delete_wizard project_task_type_delete_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_type_delete_wizard
    ADD CONSTRAINT project_task_type_delete_wizard_pkey PRIMARY KEY (id);


--
-- Name: project_task_type project_task_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_type
    ADD CONSTRAINT project_task_type_pkey PRIMARY KEY (id);


--
-- Name: project_task_type_project_task_type_delete_wizard_rel project_task_type_project_task_type_delete_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_type_project_task_type_delete_wizard_rel
    ADD CONSTRAINT project_task_type_project_task_type_delete_wizard_rel_pkey PRIMARY KEY (project_task_type_delete_wizard_id, project_task_type_id);


--
-- Name: project_task_type_rel project_task_type_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_type_rel
    ADD CONSTRAINT project_task_type_rel_pkey PRIMARY KEY (project_id, type_id);


--
-- Name: project_task_user_rel project_task_user_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_user_rel
    ADD CONSTRAINT project_task_user_rel_pkey PRIMARY KEY (id);


--
-- Name: project_task_user_rel project_task_user_rel_project_personal_stage_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_task_user_rel
    ADD CONSTRAINT project_task_user_rel_project_personal_stage_unique UNIQUE (task_id, user_id);


--
-- Name: CONSTRAINT project_task_user_rel_project_personal_stage_unique ON project_task_user_rel; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT project_task_user_rel_project_personal_stage_unique ON public.project_task_user_rel IS 'UNIQUE (task_id, user_id)';


--
-- Name: project_update project_update_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.project_update
    ADD CONSTRAINT project_update_pkey PRIMARY KEY (id);


--
-- Name: purchase_order_line purchase_order_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.purchase_order_line
    ADD CONSTRAINT purchase_order_line_pkey PRIMARY KEY (id);


--
-- Name: purchase_order purchase_order_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.purchase_order
    ADD CONSTRAINT purchase_order_pkey PRIMARY KEY (id);


--
-- Name: purchase_order_stock_picking_rel purchase_order_stock_picking_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.purchase_order_stock_picking_rel
    ADD CONSTRAINT purchase_order_stock_picking_rel_pkey PRIMARY KEY (purchase_order_id, stock_picking_id);


--
-- Name: quotation_document quotation_document_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.quotation_document
    ADD CONSTRAINT quotation_document_pkey PRIMARY KEY (id);


--
-- Name: quotation_document_sale_order_rel quotation_document_sale_order_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.quotation_document_sale_order_rel
    ADD CONSTRAINT quotation_document_sale_order_rel_pkey PRIMARY KEY (sale_order_id, quotation_document_id);


--
-- Name: quotation_document_sale_pdf_form_field_rel quotation_document_sale_pdf_form_field_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.quotation_document_sale_pdf_form_field_rel
    ADD CONSTRAINT quotation_document_sale_pdf_form_field_rel_pkey PRIMARY KEY (quotation_document_id, sale_pdf_form_field_id);


--
-- Name: rating_rating rating_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.rating_rating
    ADD CONSTRAINT rating_rating_pkey PRIMARY KEY (id);


--
-- Name: rel_badge_auth_users rel_badge_auth_users_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.rel_badge_auth_users
    ADD CONSTRAINT rel_badge_auth_users_pkey PRIMARY KEY (gamification_badge_id, res_users_id);


--
-- Name: rel_modules_langexport rel_modules_langexport_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.rel_modules_langexport
    ADD CONSTRAINT rel_modules_langexport_pkey PRIMARY KEY (wiz_id, module_id);


--
-- Name: rel_server_actions rel_server_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.rel_server_actions
    ADD CONSTRAINT rel_server_actions_pkey PRIMARY KEY (server_id, action_id);


--
-- Name: repair_order repair_order_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.repair_order
    ADD CONSTRAINT repair_order_pkey PRIMARY KEY (id);


--
-- Name: repair_order_repair_tags_rel repair_order_repair_tags_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.repair_order_repair_tags_rel
    ADD CONSTRAINT repair_order_repair_tags_rel_pkey PRIMARY KEY (repair_order_id, repair_tags_id);


--
-- Name: repair_tags repair_tags_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.repair_tags
    ADD CONSTRAINT repair_tags_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT repair_tags_name_uniq ON repair_tags; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT repair_tags_name_uniq ON public.repair_tags IS 'unique (name)';


--
-- Name: repair_tags repair_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.repair_tags
    ADD CONSTRAINT repair_tags_pkey PRIMARY KEY (id);


--
-- Name: report_layout report_layout_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.report_layout
    ADD CONSTRAINT report_layout_pkey PRIMARY KEY (id);


--
-- Name: report_paperformat report_paperformat_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.report_paperformat
    ADD CONSTRAINT report_paperformat_pkey PRIMARY KEY (id);


--
-- Name: res_bank res_bank_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_bank
    ADD CONSTRAINT res_bank_pkey PRIMARY KEY (id);


--
-- Name: res_company res_company_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_company
    ADD CONSTRAINT res_company_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT res_company_name_uniq ON res_company; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_company_name_uniq ON public.res_company IS 'unique (name)';


--
-- Name: res_company res_company_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_company
    ADD CONSTRAINT res_company_pkey PRIMARY KEY (id);


--
-- Name: res_company_users_rel res_company_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_company_users_rel
    ADD CONSTRAINT res_company_users_rel_pkey PRIMARY KEY (cid, user_id);


--
-- Name: res_config res_config_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_config
    ADD CONSTRAINT res_config_pkey PRIMARY KEY (id);


--
-- Name: res_config_settings res_config_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_config_settings
    ADD CONSTRAINT res_config_settings_pkey PRIMARY KEY (id);


--
-- Name: res_country res_country_code_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country
    ADD CONSTRAINT res_country_code_uniq UNIQUE (code);


--
-- Name: CONSTRAINT res_country_code_uniq ON res_country; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_country_code_uniq ON public.res_country IS 'unique (code)';


--
-- Name: res_country_group res_country_group_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country_group
    ADD CONSTRAINT res_country_group_pkey PRIMARY KEY (id);


--
-- Name: res_country_group_pricelist_rel res_country_group_pricelist_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country_group_pricelist_rel
    ADD CONSTRAINT res_country_group_pricelist_rel_pkey PRIMARY KEY (pricelist_id, res_country_group_id);


--
-- Name: res_country res_country_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country
    ADD CONSTRAINT res_country_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT res_country_name_uniq ON res_country; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_country_name_uniq ON public.res_country IS 'unique (name)';


--
-- Name: res_country res_country_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country
    ADD CONSTRAINT res_country_pkey PRIMARY KEY (id);


--
-- Name: res_country_res_country_group_rel res_country_res_country_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country_res_country_group_rel
    ADD CONSTRAINT res_country_res_country_group_rel_pkey PRIMARY KEY (res_country_id, res_country_group_id);


--
-- Name: res_country_state res_country_state_name_code_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country_state
    ADD CONSTRAINT res_country_state_name_code_uniq UNIQUE (country_id, code);


--
-- Name: CONSTRAINT res_country_state_name_code_uniq ON res_country_state; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_country_state_name_code_uniq ON public.res_country_state IS 'unique(country_id, code)';


--
-- Name: res_country_state res_country_state_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_country_state
    ADD CONSTRAINT res_country_state_pkey PRIMARY KEY (id);


--
-- Name: res_currency res_currency_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_currency
    ADD CONSTRAINT res_currency_pkey PRIMARY KEY (id);


--
-- Name: res_currency_rate res_currency_rate_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_currency_rate
    ADD CONSTRAINT res_currency_rate_pkey PRIMARY KEY (id);


--
-- Name: res_currency_rate res_currency_rate_unique_name_per_day; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_currency_rate
    ADD CONSTRAINT res_currency_rate_unique_name_per_day UNIQUE (name, currency_id, company_id);


--
-- Name: CONSTRAINT res_currency_rate_unique_name_per_day ON res_currency_rate; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_currency_rate_unique_name_per_day ON public.res_currency_rate IS 'unique (name,currency_id,company_id)';


--
-- Name: res_currency res_currency_unique_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_currency
    ADD CONSTRAINT res_currency_unique_name UNIQUE (name);


--
-- Name: CONSTRAINT res_currency_unique_name ON res_currency; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_currency_unique_name ON public.res_currency IS 'unique (name)';


--
-- Name: res_device_log res_device_log_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_device_log
    ADD CONSTRAINT res_device_log_pkey PRIMARY KEY (id);


--
-- Name: res_groups_implied_rel res_groups_implied_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups_implied_rel
    ADD CONSTRAINT res_groups_implied_rel_pkey PRIMARY KEY (gid, hid);


--
-- Name: res_groups res_groups_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups
    ADD CONSTRAINT res_groups_name_uniq UNIQUE (category_id, name);


--
-- Name: CONSTRAINT res_groups_name_uniq ON res_groups; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_groups_name_uniq ON public.res_groups IS 'unique (category_id, name)';


--
-- Name: res_groups res_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups
    ADD CONSTRAINT res_groups_pkey PRIMARY KEY (id);


--
-- Name: res_groups_report_rel res_groups_report_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups_report_rel
    ADD CONSTRAINT res_groups_report_rel_pkey PRIMARY KEY (uid, gid);


--
-- Name: res_groups_spreadsheet_dashboard_rel res_groups_spreadsheet_dashboard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups_spreadsheet_dashboard_rel
    ADD CONSTRAINT res_groups_spreadsheet_dashboard_rel_pkey PRIMARY KEY (spreadsheet_dashboard_id, res_groups_id);


--
-- Name: res_groups_users_rel res_groups_users_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups_users_rel
    ADD CONSTRAINT res_groups_users_rel_pkey PRIMARY KEY (gid, uid);


--
-- Name: res_groups_website_menu_rel res_groups_website_menu_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_groups_website_menu_rel
    ADD CONSTRAINT res_groups_website_menu_rel_pkey PRIMARY KEY (website_menu_id, res_groups_id);


--
-- Name: res_lang res_lang_code_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_lang
    ADD CONSTRAINT res_lang_code_uniq UNIQUE (code);


--
-- Name: CONSTRAINT res_lang_code_uniq ON res_lang; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_lang_code_uniq ON public.res_lang IS 'unique(code)';


--
-- Name: res_lang_install_rel res_lang_install_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_lang_install_rel
    ADD CONSTRAINT res_lang_install_rel_pkey PRIMARY KEY (language_wizard_id, lang_id);


--
-- Name: res_lang res_lang_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_lang
    ADD CONSTRAINT res_lang_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT res_lang_name_uniq ON res_lang; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_lang_name_uniq ON public.res_lang IS 'unique(name)';


--
-- Name: res_lang res_lang_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_lang
    ADD CONSTRAINT res_lang_pkey PRIMARY KEY (id);


--
-- Name: res_lang res_lang_url_code_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_lang
    ADD CONSTRAINT res_lang_url_code_uniq UNIQUE (url_code);


--
-- Name: CONSTRAINT res_lang_url_code_uniq ON res_lang; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_lang_url_code_uniq ON public.res_lang IS 'unique(url_code)';


--
-- Name: res_partner_autocomplete_sync res_partner_autocomplete_sync_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_autocomplete_sync
    ADD CONSTRAINT res_partner_autocomplete_sync_pkey PRIMARY KEY (id);


--
-- Name: res_partner_bank res_partner_bank_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_bank
    ADD CONSTRAINT res_partner_bank_pkey PRIMARY KEY (id);


--
-- Name: res_partner_bank res_partner_bank_unique_number; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_bank
    ADD CONSTRAINT res_partner_bank_unique_number UNIQUE (sanitized_acc_number, partner_id);


--
-- Name: CONSTRAINT res_partner_bank_unique_number ON res_partner_bank; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_partner_bank_unique_number ON public.res_partner_bank IS 'unique(sanitized_acc_number, partner_id)';


--
-- Name: res_partner_category res_partner_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_category
    ADD CONSTRAINT res_partner_category_pkey PRIMARY KEY (id);


--
-- Name: res_partner_industry res_partner_industry_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_industry
    ADD CONSTRAINT res_partner_industry_pkey PRIMARY KEY (id);


--
-- Name: res_partner res_partner_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner
    ADD CONSTRAINT res_partner_pkey PRIMARY KEY (id);


--
-- Name: res_partner_res_partner_category_rel res_partner_res_partner_category_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_res_partner_category_rel
    ADD CONSTRAINT res_partner_res_partner_category_rel_pkey PRIMARY KEY (category_id, partner_id);


--
-- Name: res_partner_title res_partner_title_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_partner_title
    ADD CONSTRAINT res_partner_title_pkey PRIMARY KEY (id);


--
-- Name: res_users_apikeys_description res_users_apikeys_description_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_apikeys_description
    ADD CONSTRAINT res_users_apikeys_description_pkey PRIMARY KEY (id);


--
-- Name: res_users_apikeys res_users_apikeys_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_apikeys
    ADD CONSTRAINT res_users_apikeys_pkey PRIMARY KEY (id);


--
-- Name: res_users_deletion res_users_deletion_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_deletion
    ADD CONSTRAINT res_users_deletion_pkey PRIMARY KEY (id);


--
-- Name: res_users_identitycheck res_users_identitycheck_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_identitycheck
    ADD CONSTRAINT res_users_identitycheck_pkey PRIMARY KEY (id);


--
-- Name: res_users_log res_users_log_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_log
    ADD CONSTRAINT res_users_log_pkey PRIMARY KEY (id);


--
-- Name: res_users res_users_login_key; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users
    ADD CONSTRAINT res_users_login_key UNIQUE (login, website_id);


--
-- Name: CONSTRAINT res_users_login_key ON res_users; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_users_login_key ON public.res_users IS 'unique (login, website_id)';


--
-- Name: res_users res_users_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users
    ADD CONSTRAINT res_users_pkey PRIMARY KEY (id);


--
-- Name: res_users_settings res_users_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_settings
    ADD CONSTRAINT res_users_settings_pkey PRIMARY KEY (id);


--
-- Name: res_users_settings res_users_settings_unique_user_id; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_settings
    ADD CONSTRAINT res_users_settings_unique_user_id UNIQUE (user_id);


--
-- Name: CONSTRAINT res_users_settings_unique_user_id ON res_users_settings; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT res_users_settings_unique_user_id ON public.res_users_settings IS 'UNIQUE(user_id)';


--
-- Name: res_users_settings_volumes res_users_settings_volumes_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_settings_volumes
    ADD CONSTRAINT res_users_settings_volumes_pkey PRIMARY KEY (id);


--
-- Name: res_users_web_tour_tour_rel res_users_web_tour_tour_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_users_web_tour_tour_rel
    ADD CONSTRAINT res_users_web_tour_tour_rel_pkey PRIMARY KEY (web_tour_tour_id, res_users_id);


--
-- Name: reset_view_arch_wizard reset_view_arch_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.reset_view_arch_wizard
    ADD CONSTRAINT reset_view_arch_wizard_pkey PRIMARY KEY (id);


--
-- Name: resource_calendar_attendance resource_calendar_attendance_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.resource_calendar_attendance
    ADD CONSTRAINT resource_calendar_attendance_pkey PRIMARY KEY (id);


--
-- Name: resource_calendar_leaves resource_calendar_leaves_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.resource_calendar_leaves
    ADD CONSTRAINT resource_calendar_leaves_pkey PRIMARY KEY (id);


--
-- Name: resource_calendar resource_calendar_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.resource_calendar
    ADD CONSTRAINT resource_calendar_pkey PRIMARY KEY (id);


--
-- Name: resource_resource resource_resource_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.resource_resource
    ADD CONSTRAINT resource_resource_pkey PRIMARY KEY (id);


--
-- Name: rule_group_rel rule_group_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.rule_group_rel
    ADD CONSTRAINT rule_group_rel_pkey PRIMARY KEY (rule_group_id, group_id);


--
-- Name: sale_advance_payment_inv sale_advance_payment_inv_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_advance_payment_inv
    ADD CONSTRAINT sale_advance_payment_inv_pkey PRIMARY KEY (id);


--
-- Name: sale_advance_payment_inv_sale_order_rel sale_advance_payment_inv_sale_order_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_advance_payment_inv_sale_order_rel
    ADD CONSTRAINT sale_advance_payment_inv_sale_order_rel_pkey PRIMARY KEY (sale_advance_payment_inv_id, sale_order_id);


--
-- Name: sale_mass_cancel_orders sale_mass_cancel_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_mass_cancel_orders
    ADD CONSTRAINT sale_mass_cancel_orders_pkey PRIMARY KEY (id);


--
-- Name: sale_order_cancel sale_order_cancel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_cancel
    ADD CONSTRAINT sale_order_cancel_pkey PRIMARY KEY (id);


--
-- Name: sale_order_discount sale_order_discount_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_discount
    ADD CONSTRAINT sale_order_discount_pkey PRIMARY KEY (id);


--
-- Name: sale_order_line_invoice_rel sale_order_line_invoice_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_line_invoice_rel
    ADD CONSTRAINT sale_order_line_invoice_rel_pkey PRIMARY KEY (invoice_line_id, order_line_id);


--
-- Name: sale_order_line sale_order_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_line
    ADD CONSTRAINT sale_order_line_pkey PRIMARY KEY (id);


--
-- Name: sale_order_line_product_document_rel sale_order_line_product_document_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_line_product_document_rel
    ADD CONSTRAINT sale_order_line_product_document_rel_pkey PRIMARY KEY (sale_order_line_id, product_document_id);


--
-- Name: sale_order_mass_cancel_wizard_rel sale_order_mass_cancel_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_mass_cancel_wizard_rel
    ADD CONSTRAINT sale_order_mass_cancel_wizard_rel_pkey PRIMARY KEY (sale_mass_cancel_orders_id, sale_order_id);


--
-- Name: sale_order_option sale_order_option_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_option
    ADD CONSTRAINT sale_order_option_pkey PRIMARY KEY (id);


--
-- Name: sale_order sale_order_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order
    ADD CONSTRAINT sale_order_pkey PRIMARY KEY (id);


--
-- Name: sale_order_tag_rel sale_order_tag_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_tag_rel
    ADD CONSTRAINT sale_order_tag_rel_pkey PRIMARY KEY (order_id, tag_id);


--
-- Name: sale_order_template_line sale_order_template_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_template_line
    ADD CONSTRAINT sale_order_template_line_pkey PRIMARY KEY (id);


--
-- Name: sale_order_template_option sale_order_template_option_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_template_option
    ADD CONSTRAINT sale_order_template_option_pkey PRIMARY KEY (id);


--
-- Name: sale_order_template sale_order_template_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_template
    ADD CONSTRAINT sale_order_template_pkey PRIMARY KEY (id);


--
-- Name: sale_order_transaction_rel sale_order_transaction_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_order_transaction_rel
    ADD CONSTRAINT sale_order_transaction_rel_pkey PRIMARY KEY (transaction_id, sale_order_id);


--
-- Name: sale_payment_provider_onboarding_wizard sale_payment_provider_onboarding_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_payment_provider_onboarding_wizard
    ADD CONSTRAINT sale_payment_provider_onboarding_wizard_pkey PRIMARY KEY (id);


--
-- Name: sale_pdf_form_field sale_pdf_form_field_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_pdf_form_field
    ADD CONSTRAINT sale_pdf_form_field_pkey PRIMARY KEY (id);


--
-- Name: sale_pdf_form_field sale_pdf_form_field_unique_name_per_doc_type; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sale_pdf_form_field
    ADD CONSTRAINT sale_pdf_form_field_unique_name_per_doc_type UNIQUE (name, document_type);


--
-- Name: CONSTRAINT sale_pdf_form_field_unique_name_per_doc_type ON sale_pdf_form_field; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT sale_pdf_form_field_unique_name_per_doc_type ON public.sale_pdf_form_field IS 'UNIQUE(name, document_type)';


--
-- Name: scheduled_message_attachment_rel scheduled_message_attachment_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.scheduled_message_attachment_rel
    ADD CONSTRAINT scheduled_message_attachment_rel_pkey PRIMARY KEY (scheduled_message_id, attachment_id);


--
-- Name: sms_account_code sms_account_code_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_account_code
    ADD CONSTRAINT sms_account_code_pkey PRIMARY KEY (id);


--
-- Name: sms_account_phone sms_account_phone_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_account_phone
    ADD CONSTRAINT sms_account_phone_pkey PRIMARY KEY (id);


--
-- Name: sms_account_sender sms_account_sender_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_account_sender
    ADD CONSTRAINT sms_account_sender_pkey PRIMARY KEY (id);


--
-- Name: sms_composer sms_composer_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_composer
    ADD CONSTRAINT sms_composer_pkey PRIMARY KEY (id);


--
-- Name: sms_resend sms_resend_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_resend
    ADD CONSTRAINT sms_resend_pkey PRIMARY KEY (id);


--
-- Name: sms_resend_recipient sms_resend_recipient_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_resend_recipient
    ADD CONSTRAINT sms_resend_recipient_pkey PRIMARY KEY (id);


--
-- Name: sms_sms sms_sms_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_sms
    ADD CONSTRAINT sms_sms_pkey PRIMARY KEY (id);


--
-- Name: sms_sms sms_sms_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_sms
    ADD CONSTRAINT sms_sms_uuid_unique UNIQUE (uuid);


--
-- Name: CONSTRAINT sms_sms_uuid_unique ON sms_sms; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT sms_sms_uuid_unique ON public.sms_sms IS 'unique(uuid)';


--
-- Name: sms_template sms_template_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_template
    ADD CONSTRAINT sms_template_pkey PRIMARY KEY (id);


--
-- Name: sms_template_preview sms_template_preview_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_template_preview
    ADD CONSTRAINT sms_template_preview_pkey PRIMARY KEY (id);


--
-- Name: sms_template_reset sms_template_reset_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_template_reset
    ADD CONSTRAINT sms_template_reset_pkey PRIMARY KEY (id);


--
-- Name: sms_template_sms_template_reset_rel sms_template_sms_template_reset_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_template_sms_template_reset_rel
    ADD CONSTRAINT sms_template_sms_template_reset_rel_pkey PRIMARY KEY (sms_template_reset_id, sms_template_id);


--
-- Name: sms_tracker sms_tracker_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_tracker
    ADD CONSTRAINT sms_tracker_pkey PRIMARY KEY (id);


--
-- Name: sms_tracker sms_tracker_sms_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.sms_tracker
    ADD CONSTRAINT sms_tracker_sms_uuid_unique UNIQUE (sms_uuid);


--
-- Name: CONSTRAINT sms_tracker_sms_uuid_unique ON sms_tracker; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT sms_tracker_sms_uuid_unique ON public.sms_tracker IS 'unique(sms_uuid)';


--
-- Name: snailmail_letter_format_error snailmail_letter_format_error_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.snailmail_letter_format_error
    ADD CONSTRAINT snailmail_letter_format_error_pkey PRIMARY KEY (id);


--
-- Name: snailmail_letter_missing_required_fields snailmail_letter_missing_required_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.snailmail_letter_missing_required_fields
    ADD CONSTRAINT snailmail_letter_missing_required_fields_pkey PRIMARY KEY (id);


--
-- Name: snailmail_letter snailmail_letter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.snailmail_letter
    ADD CONSTRAINT snailmail_letter_pkey PRIMARY KEY (id);


--
-- Name: spreadsheet_dashboard_group spreadsheet_dashboard_group_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.spreadsheet_dashboard_group
    ADD CONSTRAINT spreadsheet_dashboard_group_pkey PRIMARY KEY (id);


--
-- Name: spreadsheet_dashboard spreadsheet_dashboard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.spreadsheet_dashboard
    ADD CONSTRAINT spreadsheet_dashboard_pkey PRIMARY KEY (id);


--
-- Name: spreadsheet_dashboard_share spreadsheet_dashboard_share_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.spreadsheet_dashboard_share
    ADD CONSTRAINT spreadsheet_dashboard_share_pkey PRIMARY KEY (id);


--
-- Name: stock_backorder_confirmation_line stock_backorder_confirmation_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_backorder_confirmation_line
    ADD CONSTRAINT stock_backorder_confirmation_line_pkey PRIMARY KEY (id);


--
-- Name: stock_backorder_confirmation stock_backorder_confirmation_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_backorder_confirmation
    ADD CONSTRAINT stock_backorder_confirmation_pkey PRIMARY KEY (id);


--
-- Name: stock_change_product_qty stock_change_product_qty_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_change_product_qty
    ADD CONSTRAINT stock_change_product_qty_pkey PRIMARY KEY (id);


--
-- Name: stock_conflict_quant_rel stock_conflict_quant_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_conflict_quant_rel
    ADD CONSTRAINT stock_conflict_quant_rel_pkey PRIMARY KEY (stock_inventory_conflict_id, stock_quant_id);


--
-- Name: stock_inventory_adjustment_name stock_inventory_adjustment_name_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_adjustment_name
    ADD CONSTRAINT stock_inventory_adjustment_name_pkey PRIMARY KEY (id);


--
-- Name: stock_inventory_adjustment_name_stock_quant_rel stock_inventory_adjustment_name_stock_quant_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_adjustment_name_stock_quant_rel
    ADD CONSTRAINT stock_inventory_adjustment_name_stock_quant_rel_pkey PRIMARY KEY (stock_inventory_adjustment_name_id, stock_quant_id);


--
-- Name: stock_inventory_conflict stock_inventory_conflict_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_conflict
    ADD CONSTRAINT stock_inventory_conflict_pkey PRIMARY KEY (id);


--
-- Name: stock_inventory_conflict_stock_quant_rel stock_inventory_conflict_stock_quant_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_conflict_stock_quant_rel
    ADD CONSTRAINT stock_inventory_conflict_stock_quant_rel_pkey PRIMARY KEY (stock_inventory_conflict_id, stock_quant_id);


--
-- Name: stock_inventory_warning stock_inventory_warning_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_warning
    ADD CONSTRAINT stock_inventory_warning_pkey PRIMARY KEY (id);


--
-- Name: stock_inventory_warning_stock_quant_rel stock_inventory_warning_stock_quant_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_inventory_warning_stock_quant_rel
    ADD CONSTRAINT stock_inventory_warning_stock_quant_rel_pkey PRIMARY KEY (stock_inventory_warning_id, stock_quant_id);


--
-- Name: stock_location stock_location_barcode_company_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_location
    ADD CONSTRAINT stock_location_barcode_company_uniq UNIQUE (barcode, company_id);


--
-- Name: CONSTRAINT stock_location_barcode_company_uniq ON stock_location; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_location_barcode_company_uniq ON public.stock_location IS 'unique (barcode,company_id)';


--
-- Name: stock_location stock_location_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_location
    ADD CONSTRAINT stock_location_pkey PRIMARY KEY (id);


--
-- Name: stock_lot stock_lot_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_lot
    ADD CONSTRAINT stock_lot_pkey PRIMARY KEY (id);


--
-- Name: stock_move_created_purchase_line_rel stock_move_created_purchase_line_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_move_created_purchase_line_rel
    ADD CONSTRAINT stock_move_created_purchase_line_rel_pkey PRIMARY KEY (created_purchase_line_id, move_id);


--
-- Name: stock_move_line_consume_rel stock_move_line_consume_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_move_line_consume_rel
    ADD CONSTRAINT stock_move_line_consume_rel_pkey PRIMARY KEY (consume_line_id, produce_line_id);


--
-- Name: stock_move_line stock_move_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_move_line
    ADD CONSTRAINT stock_move_line_pkey PRIMARY KEY (id);


--
-- Name: stock_move_move_rel stock_move_move_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_move_move_rel
    ADD CONSTRAINT stock_move_move_rel_pkey PRIMARY KEY (move_orig_id, move_dest_id);


--
-- Name: stock_move stock_move_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_move
    ADD CONSTRAINT stock_move_pkey PRIMARY KEY (id);


--
-- Name: stock_orderpoint_snooze stock_orderpoint_snooze_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_orderpoint_snooze
    ADD CONSTRAINT stock_orderpoint_snooze_pkey PRIMARY KEY (id);


--
-- Name: stock_orderpoint_snooze_stock_warehouse_orderpoint_rel stock_orderpoint_snooze_stock_warehouse_orderpoint_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_orderpoint_snooze_stock_warehouse_orderpoint_rel
    ADD CONSTRAINT stock_orderpoint_snooze_stock_warehouse_orderpoint_rel_pkey PRIMARY KEY (stock_orderpoint_snooze_id, stock_warehouse_orderpoint_id);


--
-- Name: stock_package_destination stock_package_destination_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_package_destination
    ADD CONSTRAINT stock_package_destination_pkey PRIMARY KEY (id);


--
-- Name: stock_package_level stock_package_level_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_package_level
    ADD CONSTRAINT stock_package_level_pkey PRIMARY KEY (id);


--
-- Name: stock_package_type stock_package_type_barcode_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_package_type
    ADD CONSTRAINT stock_package_type_barcode_uniq UNIQUE (barcode);


--
-- Name: CONSTRAINT stock_package_type_barcode_uniq ON stock_package_type; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_package_type_barcode_uniq ON public.stock_package_type IS 'unique(barcode)';


--
-- Name: stock_package_type stock_package_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_package_type
    ADD CONSTRAINT stock_package_type_pkey PRIMARY KEY (id);


--
-- Name: stock_package_type_stock_putaway_rule_rel stock_package_type_stock_putaway_rule_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_package_type_stock_putaway_rule_rel
    ADD CONSTRAINT stock_package_type_stock_putaway_rule_rel_pkey PRIMARY KEY (stock_putaway_rule_id, stock_package_type_id);


--
-- Name: stock_picking_backorder_rel stock_picking_backorder_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking_backorder_rel
    ADD CONSTRAINT stock_picking_backorder_rel_pkey PRIMARY KEY (stock_backorder_confirmation_id, stock_picking_id);


--
-- Name: stock_picking stock_picking_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking
    ADD CONSTRAINT stock_picking_name_uniq UNIQUE (name, company_id);


--
-- Name: CONSTRAINT stock_picking_name_uniq ON stock_picking; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_picking_name_uniq ON public.stock_picking IS 'unique(name, company_id)';


--
-- Name: stock_picking stock_picking_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking
    ADD CONSTRAINT stock_picking_pkey PRIMARY KEY (id);


--
-- Name: stock_picking_sms_rel stock_picking_sms_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking_sms_rel
    ADD CONSTRAINT stock_picking_sms_rel_pkey PRIMARY KEY (confirm_stock_sms_id, stock_picking_id);


--
-- Name: stock_picking_type stock_picking_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking_type
    ADD CONSTRAINT stock_picking_type_pkey PRIMARY KEY (id);


--
-- Name: stock_putaway_rule stock_putaway_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_putaway_rule
    ADD CONSTRAINT stock_putaway_rule_pkey PRIMARY KEY (id);


--
-- Name: stock_quant_package stock_quant_package_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant_package
    ADD CONSTRAINT stock_quant_package_pkey PRIMARY KEY (id);


--
-- Name: stock_quant stock_quant_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant
    ADD CONSTRAINT stock_quant_pkey PRIMARY KEY (id);


--
-- Name: stock_quant_relocate stock_quant_relocate_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant_relocate
    ADD CONSTRAINT stock_quant_relocate_pkey PRIMARY KEY (id);


--
-- Name: stock_quant_stock_quant_relocate_rel stock_quant_stock_quant_relocate_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant_stock_quant_relocate_rel
    ADD CONSTRAINT stock_quant_stock_quant_relocate_rel_pkey PRIMARY KEY (stock_quant_relocate_id, stock_quant_id);


--
-- Name: stock_quant_stock_request_count_rel stock_quant_stock_request_count_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant_stock_request_count_rel
    ADD CONSTRAINT stock_quant_stock_request_count_rel_pkey PRIMARY KEY (stock_request_count_id, stock_quant_id);


--
-- Name: stock_quant_stock_track_confirmation_rel stock_quant_stock_track_confirmation_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quant_stock_track_confirmation_rel
    ADD CONSTRAINT stock_quant_stock_track_confirmation_rel_pkey PRIMARY KEY (stock_track_confirmation_id, stock_quant_id);


--
-- Name: stock_quantity_history stock_quantity_history_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_quantity_history
    ADD CONSTRAINT stock_quantity_history_pkey PRIMARY KEY (id);


--
-- Name: stock_replenishment_info stock_replenishment_info_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_replenishment_info
    ADD CONSTRAINT stock_replenishment_info_pkey PRIMARY KEY (id);


--
-- Name: stock_replenishment_option stock_replenishment_option_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_replenishment_option
    ADD CONSTRAINT stock_replenishment_option_pkey PRIMARY KEY (id);


--
-- Name: stock_request_count stock_request_count_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_request_count
    ADD CONSTRAINT stock_request_count_pkey PRIMARY KEY (id);


--
-- Name: stock_return_picking_line stock_return_picking_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_return_picking_line
    ADD CONSTRAINT stock_return_picking_line_pkey PRIMARY KEY (id);


--
-- Name: stock_return_picking stock_return_picking_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_return_picking
    ADD CONSTRAINT stock_return_picking_pkey PRIMARY KEY (id);


--
-- Name: stock_route_categ stock_route_categ_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_categ
    ADD CONSTRAINT stock_route_categ_pkey PRIMARY KEY (route_id, categ_id);


--
-- Name: stock_route_move stock_route_move_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_move
    ADD CONSTRAINT stock_route_move_pkey PRIMARY KEY (move_id, route_id);


--
-- Name: stock_route_packaging stock_route_packaging_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_packaging
    ADD CONSTRAINT stock_route_packaging_pkey PRIMARY KEY (route_id, packaging_id);


--
-- Name: stock_route stock_route_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route
    ADD CONSTRAINT stock_route_pkey PRIMARY KEY (id);


--
-- Name: stock_route_product stock_route_product_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_product
    ADD CONSTRAINT stock_route_product_pkey PRIMARY KEY (route_id, product_id);


--
-- Name: stock_route_stock_rules_report_rel stock_route_stock_rules_report_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_stock_rules_report_rel
    ADD CONSTRAINT stock_route_stock_rules_report_rel_pkey PRIMARY KEY (stock_rules_report_id, stock_route_id);


--
-- Name: stock_route_warehouse stock_route_warehouse_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_route_warehouse
    ADD CONSTRAINT stock_route_warehouse_pkey PRIMARY KEY (route_id, warehouse_id);


--
-- Name: stock_rule stock_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_rule
    ADD CONSTRAINT stock_rule_pkey PRIMARY KEY (id);


--
-- Name: stock_rules_report stock_rules_report_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_rules_report
    ADD CONSTRAINT stock_rules_report_pkey PRIMARY KEY (id);


--
-- Name: stock_rules_report_stock_warehouse_rel stock_rules_report_stock_warehouse_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_rules_report_stock_warehouse_rel
    ADD CONSTRAINT stock_rules_report_stock_warehouse_rel_pkey PRIMARY KEY (stock_rules_report_id, stock_warehouse_id);


--
-- Name: stock_scrap stock_scrap_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_scrap
    ADD CONSTRAINT stock_scrap_pkey PRIMARY KEY (id);


--
-- Name: stock_scrap_reason_tag stock_scrap_reason_tag_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_scrap_reason_tag
    ADD CONSTRAINT stock_scrap_reason_tag_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT stock_scrap_reason_tag_name_uniq ON stock_scrap_reason_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_scrap_reason_tag_name_uniq ON public.stock_scrap_reason_tag IS 'unique (name)';


--
-- Name: stock_scrap_reason_tag stock_scrap_reason_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_scrap_reason_tag
    ADD CONSTRAINT stock_scrap_reason_tag_pkey PRIMARY KEY (id);


--
-- Name: stock_scrap_stock_scrap_reason_tag_rel stock_scrap_stock_scrap_reason_tag_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_scrap_stock_scrap_reason_tag_rel
    ADD CONSTRAINT stock_scrap_stock_scrap_reason_tag_rel_pkey PRIMARY KEY (stock_scrap_id, stock_scrap_reason_tag_id);


--
-- Name: stock_storage_category_capacity stock_storage_category_capacity_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_storage_category_capacity
    ADD CONSTRAINT stock_storage_category_capacity_pkey PRIMARY KEY (id);


--
-- Name: stock_storage_category_capacity stock_storage_category_capacity_unique_package_type; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_storage_category_capacity
    ADD CONSTRAINT stock_storage_category_capacity_unique_package_type UNIQUE (package_type_id, storage_category_id);


--
-- Name: CONSTRAINT stock_storage_category_capacity_unique_package_type ON stock_storage_category_capacity; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_storage_category_capacity_unique_package_type ON public.stock_storage_category_capacity IS 'UNIQUE(package_type_id, storage_category_id)';


--
-- Name: stock_storage_category_capacity stock_storage_category_capacity_unique_product; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_storage_category_capacity
    ADD CONSTRAINT stock_storage_category_capacity_unique_product UNIQUE (product_id, storage_category_id);


--
-- Name: CONSTRAINT stock_storage_category_capacity_unique_product ON stock_storage_category_capacity; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_storage_category_capacity_unique_product ON public.stock_storage_category_capacity IS 'UNIQUE(product_id, storage_category_id)';


--
-- Name: stock_storage_category stock_storage_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_storage_category
    ADD CONSTRAINT stock_storage_category_pkey PRIMARY KEY (id);


--
-- Name: stock_traceability_report stock_traceability_report_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_traceability_report
    ADD CONSTRAINT stock_traceability_report_pkey PRIMARY KEY (id);


--
-- Name: stock_track_confirmation stock_track_confirmation_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_track_confirmation
    ADD CONSTRAINT stock_track_confirmation_pkey PRIMARY KEY (id);


--
-- Name: stock_track_line stock_track_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_track_line
    ADD CONSTRAINT stock_track_line_pkey PRIMARY KEY (id);


--
-- Name: stock_valuation_layer stock_valuation_layer_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_valuation_layer
    ADD CONSTRAINT stock_valuation_layer_pkey PRIMARY KEY (id);


--
-- Name: stock_valuation_layer_revaluation stock_valuation_layer_revaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_valuation_layer_revaluation
    ADD CONSTRAINT stock_valuation_layer_revaluation_pkey PRIMARY KEY (id);


--
-- Name: stock_valuation_layer_stock_valuation_layer_revaluation_rel stock_valuation_layer_stock_valuation_layer_revaluation_re_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_valuation_layer_stock_valuation_layer_revaluation_rel
    ADD CONSTRAINT stock_valuation_layer_stock_valuation_layer_revaluation_re_pkey PRIMARY KEY (stock_valuation_layer_revaluation_id, stock_valuation_layer_id);


--
-- Name: stock_warehouse_orderpoint stock_warehouse_orderpoint_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warehouse_orderpoint
    ADD CONSTRAINT stock_warehouse_orderpoint_pkey PRIMARY KEY (id);


--
-- Name: stock_warehouse_orderpoint stock_warehouse_orderpoint_product_location_check; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warehouse_orderpoint
    ADD CONSTRAINT stock_warehouse_orderpoint_product_location_check UNIQUE (product_id, location_id, company_id);


--
-- Name: CONSTRAINT stock_warehouse_orderpoint_product_location_check ON stock_warehouse_orderpoint; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_warehouse_orderpoint_product_location_check ON public.stock_warehouse_orderpoint IS 'unique (product_id, location_id, company_id)';


--
-- Name: stock_warehouse stock_warehouse_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warehouse
    ADD CONSTRAINT stock_warehouse_pkey PRIMARY KEY (id);


--
-- Name: stock_warehouse stock_warehouse_warehouse_code_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warehouse
    ADD CONSTRAINT stock_warehouse_warehouse_code_uniq UNIQUE (code, company_id);


--
-- Name: CONSTRAINT stock_warehouse_warehouse_code_uniq ON stock_warehouse; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_warehouse_warehouse_code_uniq ON public.stock_warehouse IS 'unique(code, company_id)';


--
-- Name: stock_warehouse stock_warehouse_warehouse_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warehouse
    ADD CONSTRAINT stock_warehouse_warehouse_name_uniq UNIQUE (name, company_id);


--
-- Name: CONSTRAINT stock_warehouse_warehouse_name_uniq ON stock_warehouse; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT stock_warehouse_warehouse_name_uniq ON public.stock_warehouse IS 'unique(name, company_id)';


--
-- Name: stock_warn_insufficient_qty_repair stock_warn_insufficient_qty_repair_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warn_insufficient_qty_repair
    ADD CONSTRAINT stock_warn_insufficient_qty_repair_pkey PRIMARY KEY (id);


--
-- Name: stock_warn_insufficient_qty_scrap stock_warn_insufficient_qty_scrap_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warn_insufficient_qty_scrap
    ADD CONSTRAINT stock_warn_insufficient_qty_scrap_pkey PRIMARY KEY (id);


--
-- Name: stock_warn_insufficient_qty_unbuild stock_warn_insufficient_qty_unbuild_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_warn_insufficient_qty_unbuild
    ADD CONSTRAINT stock_warn_insufficient_qty_unbuild_pkey PRIMARY KEY (id);


--
-- Name: stock_wh_resupply_table stock_wh_resupply_table_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_wh_resupply_table
    ADD CONSTRAINT stock_wh_resupply_table_pkey PRIMARY KEY (supplied_wh_id, supplier_wh_id);


--
-- Name: task_dependencies_rel task_dependencies_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.task_dependencies_rel
    ADD CONSTRAINT task_dependencies_rel_pkey PRIMARY KEY (task_id, depends_on_id);


--
-- Name: team_favorite_user_rel team_favorite_user_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.team_favorite_user_rel
    ADD CONSTRAINT team_favorite_user_rel_pkey PRIMARY KEY (team_id, user_id);


--
-- Name: template_attribute_value_mrp_production_rel template_attribute_value_mrp_production_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.template_attribute_value_mrp_production_rel
    ADD CONSTRAINT template_attribute_value_mrp_production_rel_pkey PRIMARY KEY (production_id, template_attribute_value_id);


--
-- Name: template_attribute_value_stock_move_rel template_attribute_value_stock_move_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.template_attribute_value_stock_move_rel
    ADD CONSTRAINT template_attribute_value_stock_move_rel_pkey PRIMARY KEY (move_id, template_attribute_value_id);


--
-- Name: theme_ir_asset theme_ir_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.theme_ir_asset
    ADD CONSTRAINT theme_ir_asset_pkey PRIMARY KEY (id);


--
-- Name: theme_ir_attachment theme_ir_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.theme_ir_attachment
    ADD CONSTRAINT theme_ir_attachment_pkey PRIMARY KEY (id);


--
-- Name: theme_ir_ui_view theme_ir_ui_view_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.theme_ir_ui_view
    ADD CONSTRAINT theme_ir_ui_view_pkey PRIMARY KEY (id);


--
-- Name: theme_website_menu theme_website_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.theme_website_menu
    ADD CONSTRAINT theme_website_menu_pkey PRIMARY KEY (id);


--
-- Name: theme_website_page theme_website_page_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.theme_website_page
    ADD CONSTRAINT theme_website_page_pkey PRIMARY KEY (id);


--
-- Name: uom_category uom_category_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.uom_category
    ADD CONSTRAINT uom_category_pkey PRIMARY KEY (id);


--
-- Name: uom_uom uom_uom_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.uom_uom
    ADD CONSTRAINT uom_uom_pkey PRIMARY KEY (id);


--
-- Name: update_product_attribute_value update_product_attribute_value_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.update_product_attribute_value
    ADD CONSTRAINT update_product_attribute_value_pkey PRIMARY KEY (id);


--
-- Name: utm_campaign utm_campaign_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_campaign
    ADD CONSTRAINT utm_campaign_pkey PRIMARY KEY (id);


--
-- Name: utm_campaign utm_campaign_unique_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_campaign
    ADD CONSTRAINT utm_campaign_unique_name UNIQUE (name);


--
-- Name: CONSTRAINT utm_campaign_unique_name ON utm_campaign; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT utm_campaign_unique_name ON public.utm_campaign IS 'UNIQUE(name)';


--
-- Name: utm_medium utm_medium_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_medium
    ADD CONSTRAINT utm_medium_pkey PRIMARY KEY (id);


--
-- Name: utm_medium utm_medium_unique_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_medium
    ADD CONSTRAINT utm_medium_unique_name UNIQUE (name);


--
-- Name: CONSTRAINT utm_medium_unique_name ON utm_medium; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT utm_medium_unique_name ON public.utm_medium IS 'UNIQUE(name)';


--
-- Name: utm_source utm_source_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_source
    ADD CONSTRAINT utm_source_pkey PRIMARY KEY (id);


--
-- Name: utm_source utm_source_unique_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_source
    ADD CONSTRAINT utm_source_unique_name UNIQUE (name);


--
-- Name: CONSTRAINT utm_source_unique_name ON utm_source; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT utm_source_unique_name ON public.utm_source IS 'UNIQUE(name)';


--
-- Name: utm_stage utm_stage_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_stage
    ADD CONSTRAINT utm_stage_pkey PRIMARY KEY (id);


--
-- Name: utm_tag utm_tag_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_tag
    ADD CONSTRAINT utm_tag_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT utm_tag_name_uniq ON utm_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT utm_tag_name_uniq ON public.utm_tag IS 'unique (name)';


--
-- Name: utm_tag utm_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_tag
    ADD CONSTRAINT utm_tag_pkey PRIMARY KEY (id);


--
-- Name: utm_tag_rel utm_tag_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.utm_tag_rel
    ADD CONSTRAINT utm_tag_rel_pkey PRIMARY KEY (tag_id, campaign_id);


--
-- Name: validate_account_move validate_account_move_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.validate_account_move
    ADD CONSTRAINT validate_account_move_pkey PRIMARY KEY (id);


--
-- Name: web_editor_converter_test web_editor_converter_test_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.web_editor_converter_test
    ADD CONSTRAINT web_editor_converter_test_pkey PRIMARY KEY (id);


--
-- Name: web_editor_converter_test_sub web_editor_converter_test_sub_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.web_editor_converter_test_sub
    ADD CONSTRAINT web_editor_converter_test_sub_pkey PRIMARY KEY (id);


--
-- Name: web_tour_tour web_tour_tour_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.web_tour_tour
    ADD CONSTRAINT web_tour_tour_pkey PRIMARY KEY (id);


--
-- Name: web_tour_tour_step web_tour_tour_step_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.web_tour_tour_step
    ADD CONSTRAINT web_tour_tour_step_pkey PRIMARY KEY (id);


--
-- Name: web_tour_tour web_tour_tour_uniq_name; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.web_tour_tour
    ADD CONSTRAINT web_tour_tour_uniq_name UNIQUE (name);


--
-- Name: CONSTRAINT web_tour_tour_uniq_name ON web_tour_tour; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT web_tour_tour_uniq_name ON public.web_tour_tour IS 'unique(name)';


--
-- Name: website_configurator_feature website_configurator_feature_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_configurator_feature
    ADD CONSTRAINT website_configurator_feature_pkey PRIMARY KEY (id);


--
-- Name: website_controller_page website_controller_page_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_controller_page
    ADD CONSTRAINT website_controller_page_pkey PRIMARY KEY (id);


--
-- Name: website_controller_page website_controller_page_unique_name_slugified; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_controller_page
    ADD CONSTRAINT website_controller_page_unique_name_slugified UNIQUE (name_slugified);


--
-- Name: CONSTRAINT website_controller_page_unique_name_slugified ON website_controller_page; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT website_controller_page_unique_name_slugified ON public.website_controller_page IS 'UNIQUE(name_slugified)';


--
-- Name: website_custom_blocked_third_party_domains website_custom_blocked_third_party_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_custom_blocked_third_party_domains
    ADD CONSTRAINT website_custom_blocked_third_party_domains_pkey PRIMARY KEY (id);


--
-- Name: website website_domain_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website
    ADD CONSTRAINT website_domain_unique UNIQUE (domain);


--
-- Name: CONSTRAINT website_domain_unique ON website; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT website_domain_unique ON public.website IS 'unique(domain)';


--
-- Name: website_lang_rel website_lang_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_lang_rel
    ADD CONSTRAINT website_lang_rel_pkey PRIMARY KEY (website_id, lang_id);


--
-- Name: website_menu website_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_menu
    ADD CONSTRAINT website_menu_pkey PRIMARY KEY (id);


--
-- Name: website_page website_page_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_page
    ADD CONSTRAINT website_page_pkey PRIMARY KEY (id);


--
-- Name: website_page_properties_base website_page_properties_base_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_page_properties_base
    ADD CONSTRAINT website_page_properties_base_pkey PRIMARY KEY (id);


--
-- Name: website_page_properties website_page_properties_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_page_properties
    ADD CONSTRAINT website_page_properties_pkey PRIMARY KEY (id);


--
-- Name: website website_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website
    ADD CONSTRAINT website_pkey PRIMARY KEY (id);


--
-- Name: website_rewrite website_rewrite_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_rewrite
    ADD CONSTRAINT website_rewrite_pkey PRIMARY KEY (id);


--
-- Name: website_robots website_robots_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_robots
    ADD CONSTRAINT website_robots_pkey PRIMARY KEY (id);


--
-- Name: website_route website_route_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_route
    ADD CONSTRAINT website_route_pkey PRIMARY KEY (id);


--
-- Name: website_snippet_filter website_snippet_filter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_snippet_filter
    ADD CONSTRAINT website_snippet_filter_pkey PRIMARY KEY (id);


--
-- Name: website_track website_track_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_track
    ADD CONSTRAINT website_track_pkey PRIMARY KEY (id);


--
-- Name: website_visitor website_visitor_access_token_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_visitor
    ADD CONSTRAINT website_visitor_access_token_unique UNIQUE (access_token);


--
-- Name: CONSTRAINT website_visitor_access_token_unique ON website_visitor; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT website_visitor_access_token_unique ON public.website_visitor IS 'unique(access_token)';


--
-- Name: website_visitor website_visitor_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.website_visitor
    ADD CONSTRAINT website_visitor_pkey PRIMARY KEY (id);


--
-- Name: wizard_ir_model_menu_create wizard_ir_model_menu_create_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.wizard_ir_model_menu_create
    ADD CONSTRAINT wizard_ir_model_menu_create_pkey PRIMARY KEY (id);


--
-- Name: account_account__account_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account__account_type_index ON public.account_account USING btree (account_type);


--
-- Name: account_account__code_store_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account__code_store_index ON public.account_account USING btree (((code_store IS NOT NULL))) WHERE (code_store IS NOT NULL);


--
-- Name: account_account__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account__name_index ON public.account_account USING gin (((jsonb_path_query_array(name, '$.*'::jsonpath))::text) public.gin_trgm_ops);


--
-- Name: account_account_account_journ_account_journal_id_account_ac_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_account_journ_account_journal_id_account_ac_idx ON public.account_account_account_journal_rel USING btree (account_journal_id, account_account_id);


--
-- Name: account_account_account_merge_account_account_id_account_me_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_account_merge_account_account_id_account_me_idx ON public.account_account_account_merge_wizard_rel USING btree (account_account_id, account_merge_wizard_id);


--
-- Name: account_account_account_tag_account_account_tag_id_account__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_account_tag_account_account_tag_id_account__idx ON public.account_account_account_tag USING btree (account_account_tag_id, account_account_id);


--
-- Name: account_account_res_company_r_res_company_id_account_accoun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_res_company_r_res_company_id_account_accoun_idx ON public.account_account_res_company_rel USING btree (res_company_id, account_account_id);


--
-- Name: account_account_tag_account_m_account_account_tag_id_accoun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_tag_account_m_account_account_tag_id_accoun_idx ON public.account_account_tag_account_move_line_rel USING btree (account_account_tag_id, account_move_line_id);


--
-- Name: account_account_tag_account_t_account_account_tag_id_accoun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_tag_account_t_account_account_tag_id_accoun_idx ON public.account_account_tag_account_tax_repartition_line_rel USING btree (account_account_tag_id, account_tax_repartition_line_id);


--
-- Name: account_account_tag_product_t_account_account_tag_id_produc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_tag_product_t_account_account_tag_id_produc_idx ON public.account_account_tag_product_template_rel USING btree (account_account_tag_id, product_template_id);


--
-- Name: account_account_tax_default_rel_tax_id_account_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_tax_default_rel_tax_id_account_id_idx ON public.account_account_tax_default_rel USING btree (tax_id, account_id);


--
-- Name: account_analytic_account__code_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_account__code_index ON public.account_analytic_account USING btree (code);


--
-- Name: account_analytic_account__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_account__name_index ON public.account_analytic_account USING gin (((jsonb_path_query_array(name, '$.*'::jsonpath))::text) public.gin_trgm_ops);


--
-- Name: account_analytic_account_mrp__mrp_bom_id_account_analytic_a_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_account_mrp__mrp_bom_id_account_analytic_a_idx ON public.account_analytic_account_mrp_bom_rel USING btree (mrp_bom_id, account_analytic_account_id);


--
-- Name: account_analytic_account_mrp__mrp_production_id_account_ana_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_account_mrp__mrp_production_id_account_ana_idx ON public.account_analytic_account_mrp_production_rel USING btree (mrp_production_id, account_analytic_account_id);


--
-- Name: account_analytic_account_mrp__mrp_workcenter_id_account_ana_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_account_mrp__mrp_workcenter_id_account_ana_idx ON public.account_analytic_account_mrp_workcenter_rel USING btree (mrp_workcenter_id, account_analytic_account_id);


--
-- Name: account_analytic_distribution_model_analytic_distribution_accou; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_distribution_model_analytic_distribution_accou ON public.account_analytic_distribution_model USING gin (regexp_split_to_array((jsonb_path_query_array(analytic_distribution, '$.keyvalue()."key"'::jsonpath))::text, '\D+'::text));


--
-- Name: account_analytic_line__account_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line__account_id_index ON public.account_analytic_line USING btree (account_id);


--
-- Name: account_analytic_line__date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line__date_index ON public.account_analytic_line USING btree (date);


--
-- Name: account_analytic_line__move_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line__move_line_id_index ON public.account_analytic_line USING btree (move_line_id);


--
-- Name: account_analytic_line__so_line_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line__so_line_index ON public.account_analytic_line USING btree (so_line) WHERE (so_line IS NOT NULL);


--
-- Name: account_analytic_line__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line__user_id_index ON public.account_analytic_line USING btree (user_id);


--
-- Name: account_analytic_line_stock_m_account_analytic_line_id_stoc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_line_stock_m_account_analytic_line_id_stoc_idx ON public.account_analytic_line_stock_move_rel USING btree (account_analytic_line_id, stock_move_id);


--
-- Name: account_analytic_plan__default_applicability_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_plan__default_applicability_index ON public.account_analytic_plan USING btree (((default_applicability IS NOT NULL))) WHERE (default_applicability IS NOT NULL);


--
-- Name: account_analytic_plan__parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_plan__parent_path_index ON public.account_analytic_plan USING btree (parent_path);


--
-- Name: account_automatic_entry_wizar_account_move_line_id_account__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_automatic_entry_wizar_account_move_line_id_account__idx ON public.account_automatic_entry_wizard_account_move_line_rel USING btree (account_move_line_id, account_automatic_entry_wizard_id);


--
-- Name: account_bank_statement__date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement__date_index ON public.account_bank_statement USING btree (date);


--
-- Name: account_bank_statement_first_line_index_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_first_line_index_idx ON public.account_bank_statement USING btree (journal_id, first_line_index);


--
-- Name: account_bank_statement_ir_att_ir_attachment_id_account_bank_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_ir_att_ir_attachment_id_account_bank_idx ON public.account_bank_statement_ir_attachment_rel USING btree (ir_attachment_id, account_bank_statement_id);


--
-- Name: account_bank_statement_journal_id_date_desc_id_desc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_journal_id_date_desc_id_desc_idx ON public.account_bank_statement USING btree (journal_id, date DESC, id DESC);


--
-- Name: account_bank_statement_line__move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_line__move_id_index ON public.account_bank_statement_line USING btree (move_id);


--
-- Name: account_bank_statement_line_main_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_line_main_idx ON public.account_bank_statement_line USING btree (journal_id, company_id, internal_index);


--
-- Name: account_bank_statement_line_orphan_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_line_orphan_idx ON public.account_bank_statement_line USING btree (journal_id, company_id, internal_index) WHERE (statement_id IS NULL);


--
-- Name: account_bank_statement_line_unreconciled_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_line_unreconciled_idx ON public.account_bank_statement_line USING btree (journal_id, company_id, internal_index) WHERE ((NOT is_reconciled) OR (is_reconciled IS NULL));


--
-- Name: account_cash_rounding__loss_account_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_cash_rounding__loss_account_id_index ON public.account_cash_rounding USING btree (((loss_account_id IS NOT NULL))) WHERE (loss_account_id IS NOT NULL);


--
-- Name: account_cash_rounding__profit_account_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_cash_rounding__profit_account_id_index ON public.account_cash_rounding USING btree (((profit_account_id IS NOT NULL))) WHERE (profit_account_id IS NOT NULL);


--
-- Name: account_edi_proxy_client_user_unique_active_company_proxy; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX account_edi_proxy_client_user_unique_active_company_proxy ON public.account_edi_proxy_client_user USING btree (company_id, proxy_type, edi_mode) WHERE (active = true);


--
-- Name: account_fiscal_position_res_c_res_country_state_id_account__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_fiscal_position_res_c_res_country_state_id_account__idx ON public.account_fiscal_position_res_country_state_rel USING btree (res_country_state_id, account_fiscal_position_id);


--
-- Name: account_full_reconcile__exchange_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_full_reconcile__exchange_move_id_index ON public.account_full_reconcile USING btree (exchange_move_id) WHERE (exchange_move_id IS NOT NULL);


--
-- Name: account_group__parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_group__parent_id_index ON public.account_group USING btree (parent_id);


--
-- Name: account_invoice_transaction_rel_transaction_id_invoice_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_invoice_transaction_rel_transaction_id_invoice_id_idx ON public.account_invoice_transaction_rel USING btree (transaction_id, invoice_id);


--
-- Name: account_journal__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_journal__company_id_index ON public.account_journal USING btree (company_id);


--
-- Name: account_journal_account_journ_account_journal_id_account_jo_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_journal_account_journ_account_journal_id_account_jo_idx ON public.account_journal_account_journal_group_rel USING btree (account_journal_id, account_journal_group_id);


--
-- Name: account_journal_account_recon_account_journal_id_account_re_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_journal_account_recon_account_journal_id_account_re_idx ON public.account_journal_account_reconcile_model_rel USING btree (account_journal_id, account_reconcile_model_id);


--
-- Name: account_lock_exception_company_id_end_datetime_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_lock_exception_company_id_end_datetime_idx ON public.account_lock_exception USING btree (company_id, user_id, end_datetime) WHERE (active = true);


--
-- Name: account_move__account_payment_payment_id_invoice_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__account_payment_payment_id_invoice_id_idx ON public.account_move__account_payment USING btree (payment_id, invoice_id);


--
-- Name: account_move__auto_post_origin_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__auto_post_origin_id_index ON public.account_move USING btree (auto_post_origin_id) WHERE (auto_post_origin_id IS NOT NULL);


--
-- Name: account_move__campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__campaign_id_index ON public.account_move USING btree (campaign_id) WHERE (campaign_id IS NOT NULL);


--
-- Name: account_move__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__company_id_index ON public.account_move USING btree (company_id);


--
-- Name: account_move__date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__date_index ON public.account_move USING btree (date);


--
-- Name: account_move__inalterable_hash_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__inalterable_hash_index ON public.account_move USING btree (inalterable_hash) WHERE (inalterable_hash IS NOT NULL);


--
-- Name: account_move__invoice_date_due_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__invoice_date_due_index ON public.account_move USING btree (invoice_date_due);


--
-- Name: account_move__invoice_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__invoice_date_index ON public.account_move USING btree (invoice_date);


--
-- Name: account_move__medium_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__medium_id_index ON public.account_move USING btree (medium_id) WHERE (medium_id IS NOT NULL);


--
-- Name: account_move__message_main_attachment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__message_main_attachment_id_index ON public.account_move USING btree (message_main_attachment_id) WHERE (message_main_attachment_id IS NOT NULL);


--
-- Name: account_move__move_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__move_type_index ON public.account_move USING btree (move_type);


--
-- Name: account_move__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__name_index ON public.account_move USING gin (name public.gin_trgm_ops);


--
-- Name: account_move__origin_payment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__origin_payment_id_index ON public.account_move USING btree (origin_payment_id) WHERE (origin_payment_id IS NOT NULL);


--
-- Name: account_move__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__partner_id_index ON public.account_move USING btree (partner_id);


--
-- Name: account_move__payment_reference_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__payment_reference_index ON public.account_move USING gin (payment_reference public.gin_trgm_ops);


--
-- Name: account_move__ref_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__ref_index ON public.account_move USING gin (ref public.gin_trgm_ops);


--
-- Name: account_move__reversed_entry_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__reversed_entry_id_index ON public.account_move USING btree (reversed_entry_id) WHERE (reversed_entry_id IS NOT NULL);


--
-- Name: account_move__secure_sequence_number_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__secure_sequence_number_index ON public.account_move USING btree (secure_sequence_number);


--
-- Name: account_move__source_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__source_id_index ON public.account_move USING btree (source_id) WHERE (source_id IS NOT NULL);


--
-- Name: account_move__statement_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__statement_line_id_index ON public.account_move USING btree (statement_line_id) WHERE (statement_line_id IS NOT NULL);


--
-- Name: account_move__stock_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__stock_move_id_index ON public.account_move USING btree (stock_move_id) WHERE (stock_move_id IS NOT NULL);


--
-- Name: account_move__tax_cash_basis_origin_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__tax_cash_basis_origin_move_id_index ON public.account_move USING btree (tax_cash_basis_origin_move_id) WHERE (tax_cash_basis_origin_move_id IS NOT NULL);


--
-- Name: account_move__tax_cash_basis_rec_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move__tax_cash_basis_rec_id_index ON public.account_move USING btree (tax_cash_basis_rec_id) WHERE (tax_cash_basis_rec_id IS NOT NULL);


--
-- Name: account_move_account_move_sen_account_move_id_account_move__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_account_move_sen_account_move_id_account_move__idx ON public.account_move_account_move_send_batch_wizard_rel USING btree (account_move_id, account_move_send_batch_wizard_id);


--
-- Name: account_move_account_peppol_r_account_move_id_account_peppo_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_account_peppol_r_account_move_id_account_peppo_idx ON public.account_move_account_peppol_rejection_wizard_rel USING btree (account_move_id, account_peppol_rejection_wizard_id);


--
-- Name: account_move_account_resequen_account_move_id_account_reseq_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_account_resequen_account_move_id_account_reseq_idx ON public.account_move_account_resequence_wizard_rel USING btree (account_move_id, account_resequence_wizard_id);


--
-- Name: account_move_checked_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_checked_idx ON public.account_move USING btree (journal_id) WHERE (checked = false);


--
-- Name: account_move_duplicate_bills_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_duplicate_bills_idx ON public.account_move USING btree (ref) WHERE ((move_type)::text = ANY ((ARRAY['in_invoice'::character varying, 'in_refund'::character varying])::text[]));


--
-- Name: account_move_journal_id_company_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_journal_id_company_id_idx ON public.account_move USING btree (journal_id, company_id, date);


--
-- Name: account_move_line__cogs_origin_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__cogs_origin_id_index ON public.account_move_line USING btree (cogs_origin_id) WHERE (cogs_origin_id IS NOT NULL);


--
-- Name: account_move_line__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__company_id_index ON public.account_move_line USING btree (company_id);


--
-- Name: account_move_line__date_maturity_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__date_maturity_index ON public.account_move_line USING btree (date_maturity);


--
-- Name: account_move_line__full_reconcile_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__full_reconcile_id_index ON public.account_move_line USING btree (full_reconcile_id) WHERE (full_reconcile_id IS NOT NULL);


--
-- Name: account_move_line__group_tax_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__group_tax_id_index ON public.account_move_line USING btree (group_tax_id) WHERE (group_tax_id IS NOT NULL);


--
-- Name: account_move_line__journal_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__journal_id_index ON public.account_move_line USING btree (journal_id);


--
-- Name: account_move_line__matching_number_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__matching_number_index ON public.account_move_line USING btree (matching_number);


--
-- Name: account_move_line__move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__move_id_index ON public.account_move_line USING btree (move_id);


--
-- Name: account_move_line__move_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__move_name_index ON public.account_move_line USING btree (move_name);


--
-- Name: account_move_line__payment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__payment_id_index ON public.account_move_line USING btree (payment_id) WHERE (payment_id IS NOT NULL);


--
-- Name: account_move_line__product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__product_id_index ON public.account_move_line USING btree (product_id);


--
-- Name: account_move_line__purchase_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__purchase_line_id_index ON public.account_move_line USING btree (purchase_line_id) WHERE (purchase_line_id IS NOT NULL);


--
-- Name: account_move_line__ref_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__ref_index ON public.account_move_line USING gin (ref public.gin_trgm_ops);


--
-- Name: account_move_line__statement_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__statement_id_index ON public.account_move_line USING btree (statement_id) WHERE (statement_id IS NOT NULL);


--
-- Name: account_move_line__statement_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__statement_line_id_index ON public.account_move_line USING btree (statement_line_id) WHERE (statement_line_id IS NOT NULL);


--
-- Name: account_move_line__unreconciled_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line__unreconciled_index ON public.account_move_line USING btree (account_id, partner_id) WHERE (((reconciled IS NULL) OR (reconciled = false) OR (reconciled IS NOT TRUE)) AND ((parent_state)::text = 'posted'::text));


--
-- Name: account_move_line_account_id_date_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_account_id_date_idx ON public.account_move_line USING btree (account_id, date);


--
-- Name: account_move_line_account_tax_account_tax_id_account_move_l_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_account_tax_account_tax_id_account_move_l_idx ON public.account_move_line_account_tax_rel USING btree (account_tax_id, account_move_line_id);


--
-- Name: account_move_line_analytic_distribution_accounts_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_analytic_distribution_accounts_gin_index ON public.account_move_line USING gin (regexp_split_to_array((jsonb_path_query_array(analytic_distribution, '$.keyvalue()."key"'::jsonpath))::text, '\D+'::text));


--
-- Name: account_move_line_date_name_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_date_name_id_idx ON public.account_move_line USING btree (date DESC, move_name DESC, id);


--
-- Name: account_move_line_journal_id_neg_amnt_residual_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_journal_id_neg_amnt_residual_idx ON public.account_move_line USING btree (journal_id) WHERE ((amount_residual < (0)::numeric) AND ((parent_state)::text = 'posted'::text));


--
-- Name: account_move_line_partner_id_ref_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_partner_id_ref_idx ON public.account_move_line USING btree (partner_id, ref);


--
-- Name: account_move_made_gaps; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_made_gaps ON public.account_move USING btree (journal_id, company_id, date) WHERE (made_sequence_gap = true);


--
-- Name: account_move_mrp_production_r_mrp_production_id_account_mov_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_mrp_production_r_mrp_production_id_account_mov_idx ON public.account_move_mrp_production_rel USING btree (mrp_production_id, account_move_id);


--
-- Name: account_move_payment_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_payment_idx ON public.account_move USING btree (journal_id, state, payment_state, move_type, date);


--
-- Name: account_move_purchase_order_r_account_move_id_purchase_orde_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_purchase_order_r_account_move_id_purchase_orde_idx ON public.account_move_purchase_order_rel USING btree (account_move_id, purchase_order_id);


--
-- Name: account_move_reversal_move_move_id_reversal_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_reversal_move_move_id_reversal_id_idx ON public.account_move_reversal_move USING btree (move_id, reversal_id);


--
-- Name: account_move_reversal_new_move_new_move_id_reversal_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_reversal_new_move_new_move_id_reversal_id_idx ON public.account_move_reversal_new_move USING btree (new_move_id, reversal_id);


--
-- Name: account_move_send_wizard_res__res_partner_id_account_move_s_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_send_wizard_res__res_partner_id_account_move_s_idx ON public.account_move_send_wizard_res_partner_rel USING btree (res_partner_id, account_move_send_wizard_id);


--
-- Name: account_move_sequence_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_sequence_index ON public.account_move USING btree (journal_id, sequence_prefix DESC, sequence_number DESC, name);


--
-- Name: account_move_sequence_index2; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_sequence_index2 ON public.account_move USING btree (journal_id, id DESC, sequence_prefix);


--
-- Name: account_move_unique_name; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX account_move_unique_name ON public.account_move USING btree (name, journal_id) WHERE (((state)::text = 'posted'::text) AND ((name)::text <> '/'::text));


--
-- Name: account_move_validate_account_account_move_id_validate_acco_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_validate_account_account_move_id_validate_acco_idx ON public.account_move_validate_account_move_rel USING btree (account_move_id, validate_account_move_id);


--
-- Name: account_partial_reconcile__credit_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_partial_reconcile__credit_move_id_index ON public.account_partial_reconcile USING btree (credit_move_id);


--
-- Name: account_partial_reconcile__debit_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_partial_reconcile__debit_move_id_index ON public.account_partial_reconcile USING btree (debit_move_id);


--
-- Name: account_partial_reconcile__exchange_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_partial_reconcile__exchange_move_id_index ON public.account_partial_reconcile USING btree (exchange_move_id) WHERE (exchange_move_id IS NOT NULL);


--
-- Name: account_partial_reconcile__full_reconcile_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_partial_reconcile__full_reconcile_id_index ON public.account_partial_reconcile USING btree (full_reconcile_id) WHERE (full_reconcile_id IS NOT NULL);


--
-- Name: account_payment__message_main_attachment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment__message_main_attachment_id_index ON public.account_payment USING btree (message_main_attachment_id) WHERE (message_main_attachment_id IS NOT NULL);


--
-- Name: account_payment__move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment__move_id_index ON public.account_payment USING btree (move_id);


--
-- Name: account_payment__outstanding_account_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment__outstanding_account_id_index ON public.account_payment USING btree (outstanding_account_id) WHERE (outstanding_account_id IS NOT NULL);


--
-- Name: account_payment__paired_internal_transfer_payment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment__paired_internal_transfer_payment_id_index ON public.account_payment USING btree (paired_internal_transfer_payment_id) WHERE (paired_internal_transfer_payment_id IS NOT NULL);


--
-- Name: account_payment__source_payment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment__source_payment_id_index ON public.account_payment USING btree (source_payment_id) WHERE (source_payment_id IS NOT NULL);


--
-- Name: account_payment_account_bank__account_payment_id_account_ba_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment_account_bank__account_payment_id_account_ba_idx ON public.account_payment_account_bank_statement_line_rel USING btree (account_payment_id, account_bank_statement_line_id);


--
-- Name: account_payment_journal_id_company_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment_journal_id_company_id_idx ON public.account_payment USING btree (journal_id, company_id);


--
-- Name: account_payment_register_move_line_rel_line_id_wizard_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment_register_move_line_rel_line_id_wizard_id_idx ON public.account_payment_register_move_line_rel USING btree (line_id, wizard_id);


--
-- Name: account_payment_term_line__payment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment_term_line__payment_id_index ON public.account_payment_term_line USING btree (payment_id);


--
-- Name: account_payment_unmatched_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_payment_unmatched_idx ON public.account_payment USING btree (journal_id, company_id) WHERE ((NOT is_matched) OR (is_matched IS NULL));


--
-- Name: account_peppol_rejection_acti_account_peppol_clarification__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_peppol_rejection_acti_account_peppol_clarification__idx ON public.account_peppol_rejection_action_rel USING btree (account_peppol_clarification_id, account_peppol_rejection_wizard_id);


--
-- Name: account_peppol_rejection_reas_account_peppol_clarification__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_peppol_rejection_reas_account_peppol_clarification__idx ON public.account_peppol_rejection_reason_rel USING btree (account_peppol_clarification_id, account_peppol_rejection_wizard_id);


--
-- Name: account_reconcile_model_line__account_tax_id_account_reconc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_line__account_tax_id_account_reconc_idx ON public.account_reconcile_model_line_account_tax_rel USING btree (account_tax_id, account_reconcile_model_line_id);


--
-- Name: account_reconcile_model_line_analytic_distribution_accounts_gin; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_line_analytic_distribution_accounts_gin ON public.account_reconcile_model_line USING gin (regexp_split_to_array((jsonb_path_query_array(analytic_distribution, '$.keyvalue()."key"'::jsonpath))::text, '\D+'::text));


--
-- Name: account_reconcile_model_res_p_res_partner_category_id_accou_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_res_p_res_partner_category_id_accou_idx ON public.account_reconcile_model_res_partner_category_rel USING btree (res_partner_category_id, account_reconcile_model_id);


--
-- Name: account_reconcile_model_res_p_res_partner_id_account_reconc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_res_p_res_partner_id_account_reconc_idx ON public.account_reconcile_model_res_partner_rel USING btree (res_partner_id, account_reconcile_model_id);


--
-- Name: account_report_section_rel_sub_report_id_main_report_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_report_section_rel_sub_report_id_main_report_id_idx ON public.account_report_section_rel USING btree (sub_report_id, main_report_id);


--
-- Name: account_tax_filiation_rel_child_tax_parent_tax_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_filiation_rel_child_tax_parent_tax_idx ON public.account_tax_filiation_rel USING btree (child_tax, parent_tax);


--
-- Name: account_tax_purchase_order_li_account_tax_id_purchase_order_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_purchase_order_li_account_tax_id_purchase_order_idx ON public.account_tax_purchase_order_line_rel USING btree (account_tax_id, purchase_order_line_id);


--
-- Name: account_tax_sale_order_discou_account_tax_id_sale_order_dis_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_sale_order_discou_account_tax_id_sale_order_dis_idx ON public.account_tax_sale_order_discount_rel USING btree (account_tax_id, sale_order_discount_id);


--
-- Name: account_tax_sale_order_line_r_account_tax_id_sale_order_lin_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_sale_order_line_r_account_tax_id_sale_order_lin_idx ON public.account_tax_sale_order_line_rel USING btree (account_tax_id, sale_order_line_id);


--
-- Name: act_window_view_unique_mode_per_action; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX act_window_view_unique_mode_per_action ON public.ir_act_window_view USING btree (act_window_id, view_mode);


--
-- Name: activity_attachment_rel_attachment_id_activity_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX activity_attachment_rel_attachment_id_activity_id_idx ON public.activity_attachment_rel USING btree (attachment_id, activity_id);


--
-- Name: auth_totp_device_user_id_index_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX auth_totp_device_user_id_index_idx ON public.auth_totp_device USING btree (user_id, index);


--
-- Name: badge_unlocked_definition_rel_gamification_goal_definition__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX badge_unlocked_definition_rel_gamification_goal_definition__idx ON public.badge_unlocked_definition_rel USING btree (gamification_goal_definition_id, gamification_badge_id);


--
-- Name: base_import_mapping__res_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX base_import_mapping__res_model_index ON public.base_import_mapping USING btree (res_model);


--
-- Name: base_language_install_website_website_id_base_language_inst_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX base_language_install_website_website_id_base_language_inst_idx ON public.base_language_install_website_rel USING btree (website_id, base_language_install_id);


--
-- Name: base_partner_merge_automatic__res_partner_id_base_partner_m_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX base_partner_merge_automatic__res_partner_id_base_partner_m_idx ON public.base_partner_merge_automatic_wizard_res_partner_rel USING btree (res_partner_id, base_partner_merge_automatic_wizard_id);


--
-- Name: bus_presence_guest_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX bus_presence_guest_unique ON public.bus_presence USING btree (guest_id) WHERE (guest_id IS NOT NULL);


--
-- Name: bus_presence_user_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX bus_presence_user_unique ON public.bus_presence USING btree (user_id) WHERE (user_id IS NOT NULL);


--
-- Name: calendar_alarm_calendar_event_calendar_alarm_id_calendar_ev_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_alarm_calendar_event_calendar_alarm_id_calendar_ev_idx ON public.calendar_alarm_calendar_event_rel USING btree (calendar_alarm_id, calendar_event_id);


--
-- Name: calendar_event__access_token_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_event__access_token_index ON public.calendar_event USING btree (access_token);


--
-- Name: calendar_event__opportunity_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_event__opportunity_id_index ON public.calendar_event USING btree (opportunity_id);


--
-- Name: calendar_event_res_partner_re_calendar_event_id_res_partner_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_event_res_partner_re_calendar_event_id_res_partner_idx ON public.calendar_event_res_partner_rel USING btree (calendar_event_id, res_partner_id);


--
-- Name: calendar_filters__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_filters__partner_id_index ON public.calendar_filters USING btree (partner_id);


--
-- Name: calendar_filters__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX calendar_filters__user_id_index ON public.calendar_filters USING btree (user_id);


--
-- Name: crm_convert_lead_mass_lead_re_crm_lead_id_crm_lead2opportun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_convert_lead_mass_lead_re_crm_lead_id_crm_lead2opportun_idx ON public.crm_convert_lead_mass_lead_rel USING btree (crm_lead_id, crm_lead2opportunity_partner_mass_id);


--
-- Name: crm_iap_lead_industry_crm_iap_crm_iap_lead_industry_id_crm__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_iap_lead_industry_crm_iap_crm_iap_lead_industry_id_crm__idx ON public.crm_iap_lead_industry_crm_iap_lead_mining_request_rel USING btree (crm_iap_lead_industry_id, crm_iap_lead_mining_request_id);


--
-- Name: crm_iap_lead_mining_request_c_crm_iap_lead_role_id_crm_iap__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_iap_lead_mining_request_c_crm_iap_lead_role_id_crm_iap__idx ON public.crm_iap_lead_mining_request_crm_iap_lead_role_rel USING btree (crm_iap_lead_role_id, crm_iap_lead_mining_request_id);


--
-- Name: crm_iap_lead_mining_request_c_crm_tag_id_crm_iap_lead_minin_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_iap_lead_mining_request_c_crm_tag_id_crm_iap_lead_minin_idx ON public.crm_iap_lead_mining_request_crm_tag_rel USING btree (crm_tag_id, crm_iap_lead_mining_request_id);


--
-- Name: crm_iap_lead_mining_request_r_res_country_id_crm_iap_lead_m_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_iap_lead_mining_request_r_res_country_id_crm_iap_lead_m_idx ON public.crm_iap_lead_mining_request_res_country_rel USING btree (res_country_id, crm_iap_lead_mining_request_id);


--
-- Name: crm_iap_lead_mining_request_r_res_country_state_id_crm_iap__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_iap_lead_mining_request_r_res_country_state_id_crm_iap__idx ON public.crm_iap_lead_mining_request_res_country_state_rel USING btree (res_country_state_id, crm_iap_lead_mining_request_id);


--
-- Name: crm_lead2opportunity_partner__res_users_id_crm_lead2opportu_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead2opportunity_partner__res_users_id_crm_lead2opportu_idx ON public.crm_lead2opportunity_partner_mass_res_users_rel USING btree (res_users_id, crm_lead2opportunity_partner_mass_id);


--
-- Name: crm_lead__campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__campaign_id_index ON public.crm_lead USING btree (campaign_id) WHERE (campaign_id IS NOT NULL);


--
-- Name: crm_lead__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__company_id_index ON public.crm_lead USING btree (company_id);


--
-- Name: crm_lead__contact_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__contact_name_index ON public.crm_lead USING gin (contact_name public.gin_trgm_ops);


--
-- Name: crm_lead__date_last_stage_update_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__date_last_stage_update_index ON public.crm_lead USING btree (date_last_stage_update);


--
-- Name: crm_lead__email_domain_criterion_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__email_domain_criterion_index ON public.crm_lead USING btree (email_domain_criterion) WHERE (email_domain_criterion IS NOT NULL);


--
-- Name: crm_lead__email_from_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__email_from_index ON public.crm_lead USING gin (email_from public.gin_trgm_ops);


--
-- Name: crm_lead__email_normalized_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__email_normalized_index ON public.crm_lead USING gin (email_normalized public.gin_trgm_ops);


--
-- Name: crm_lead__lead_mining_request_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__lead_mining_request_id_index ON public.crm_lead USING btree (lead_mining_request_id) WHERE (lead_mining_request_id IS NOT NULL);


--
-- Name: crm_lead__lost_reason_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__lost_reason_id_index ON public.crm_lead USING btree (lost_reason_id);


--
-- Name: crm_lead__medium_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__medium_id_index ON public.crm_lead USING btree (medium_id) WHERE (medium_id IS NOT NULL);


--
-- Name: crm_lead__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__name_index ON public.crm_lead USING gin (name public.gin_trgm_ops);


--
-- Name: crm_lead__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__partner_id_index ON public.crm_lead USING btree (partner_id);


--
-- Name: crm_lead__partner_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__partner_name_index ON public.crm_lead USING gin (partner_name public.gin_trgm_ops);


--
-- Name: crm_lead__phone_sanitized_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__phone_sanitized_index ON public.crm_lead USING btree (phone_sanitized) WHERE (phone_sanitized IS NOT NULL);


--
-- Name: crm_lead__priority_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__priority_index ON public.crm_lead USING btree (priority);


--
-- Name: crm_lead__reveal_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__reveal_id_index ON public.crm_lead USING btree (reveal_id) WHERE (reveal_id IS NOT NULL);


--
-- Name: crm_lead__source_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__source_id_index ON public.crm_lead USING btree (source_id) WHERE (source_id IS NOT NULL);


--
-- Name: crm_lead__stage_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__stage_id_index ON public.crm_lead USING btree (stage_id);


--
-- Name: crm_lead__team_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__team_id_index ON public.crm_lead USING btree (team_id);


--
-- Name: crm_lead__type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__type_index ON public.crm_lead USING btree (type);


--
-- Name: crm_lead__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead__user_id_index ON public.crm_lead USING btree (user_id);


--
-- Name: crm_lead_create_date_team_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_create_date_team_id_idx ON public.crm_lead USING btree (create_date, team_id);


--
-- Name: crm_lead_crm_lead2opportunity_crm_lead_id_crm_lead2opportu_idx1; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_crm_lead2opportunity_crm_lead_id_crm_lead2opportu_idx1 ON public.crm_lead_crm_lead2opportunity_partner_mass_rel USING btree (crm_lead_id, crm_lead2opportunity_partner_mass_id);


--
-- Name: crm_lead_crm_lead2opportunity_crm_lead_id_crm_lead2opportun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_crm_lead2opportunity_crm_lead_id_crm_lead2opportun_idx ON public.crm_lead_crm_lead2opportunity_partner_rel USING btree (crm_lead_id, crm_lead2opportunity_partner_id);


--
-- Name: crm_lead_crm_lead_lost_rel_crm_lead_id_crm_lead_lost_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_crm_lead_lost_rel_crm_lead_id_crm_lead_lost_id_idx ON public.crm_lead_crm_lead_lost_rel USING btree (crm_lead_id, crm_lead_lost_id);


--
-- Name: crm_lead_mobile_partial_gin_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_mobile_partial_gin_idx ON public.crm_lead USING gin (regexp_replace((mobile)::text, '[\s\\./\(\)\-]'::text, ''::text, 'g'::text) public.gin_trgm_ops) WHERE (mobile IS NOT NULL);


--
-- Name: crm_lead_mobile_partial_tgm; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_mobile_partial_tgm ON public.crm_lead USING btree (regexp_replace((mobile)::text, '[\s\\./\(\)\-]'::text, ''::text, 'g'::text)) WHERE (mobile IS NOT NULL);


--
-- Name: crm_lead_phone_partial_gin_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_phone_partial_gin_idx ON public.crm_lead USING gin (regexp_replace((phone)::text, '[\s\\./\(\)\-]'::text, ''::text, 'g'::text) public.gin_trgm_ops) WHERE (phone IS NOT NULL);


--
-- Name: crm_lead_phone_partial_tgm; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_phone_partial_tgm ON public.crm_lead USING btree (regexp_replace((phone)::text, '[\s\\./\(\)\-]'::text, ''::text, 'g'::text)) WHERE (phone IS NOT NULL);


--
-- Name: crm_lead_pls_update_crm_lead__crm_lead_scoring_frequency_fi_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_pls_update_crm_lead__crm_lead_scoring_frequency_fi_idx ON public.crm_lead_pls_update_crm_lead_scoring_frequency_field_rel USING btree (crm_lead_scoring_frequency_field_id, crm_lead_pls_update_id);


--
-- Name: crm_lead_scoring_frequency__variable_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_scoring_frequency__variable_index ON public.crm_lead_scoring_frequency USING btree (variable);


--
-- Name: crm_lead_user_id_team_id_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_user_id_team_id_type_index ON public.crm_lead USING btree (user_id, team_id, type);


--
-- Name: crm_lead_website_visitor_rel_website_visitor_id_crm_lead_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_website_visitor_rel_website_visitor_id_crm_lead_id_idx ON public.crm_lead_website_visitor_rel USING btree (website_visitor_id, crm_lead_id);


--
-- Name: crm_tag_rel_tag_id_lead_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_tag_rel_tag_id_lead_id_idx ON public.crm_tag_rel USING btree (tag_id, lead_id);


--
-- Name: crm_team__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_team__company_id_index ON public.crm_team USING btree (company_id);


--
-- Name: crm_team_member__crm_team_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_team_member__crm_team_id_index ON public.crm_team_member USING btree (crm_team_id);


--
-- Name: crm_team_member__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_team_member__user_id_index ON public.crm_team_member USING btree (user_id);


--
-- Name: digest_digest_res_users_rel_res_users_id_digest_digest_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX digest_digest_res_users_rel_res_users_id_digest_digest_id_idx ON public.digest_digest_res_users_rel USING btree (res_users_id, digest_digest_id);


--
-- Name: digest_tip_res_users_rel_res_users_id_digest_tip_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX digest_tip_res_users_rel_res_users_id_digest_tip_id_idx ON public.digest_tip_res_users_rel USING btree (res_users_id, digest_tip_id);


--
-- Name: discuss_channel__last_interest_dt_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel__last_interest_dt_index ON public.discuss_channel USING btree (last_interest_dt);


--
-- Name: discuss_channel__parent_channel_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel__parent_channel_id_index ON public.discuss_channel USING btree (parent_channel_id);


--
-- Name: discuss_channel_hr_department_hr_department_id_discuss_chan_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_hr_department_hr_department_id_discuss_chan_idx ON public.discuss_channel_hr_department_rel USING btree (hr_department_id, discuss_channel_id);


--
-- Name: discuss_channel_member__fetched_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__fetched_message_id_index ON public.discuss_channel_member USING btree (fetched_message_id) WHERE (fetched_message_id IS NOT NULL);


--
-- Name: discuss_channel_member__guest_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__guest_id_index ON public.discuss_channel_member USING btree (guest_id);


--
-- Name: discuss_channel_member__last_interest_dt_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__last_interest_dt_index ON public.discuss_channel_member USING btree (last_interest_dt);


--
-- Name: discuss_channel_member__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__partner_id_index ON public.discuss_channel_member USING btree (partner_id);


--
-- Name: discuss_channel_member__seen_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__seen_message_id_index ON public.discuss_channel_member USING btree (seen_message_id) WHERE (seen_message_id IS NOT NULL);


--
-- Name: discuss_channel_member__unpin_dt_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member__unpin_dt_index ON public.discuss_channel_member USING btree (unpin_dt);


--
-- Name: discuss_channel_member_guest_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX discuss_channel_member_guest_unique ON public.discuss_channel_member USING btree (channel_id, guest_id) WHERE (guest_id IS NOT NULL);


--
-- Name: discuss_channel_member_partner_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX discuss_channel_member_partner_unique ON public.discuss_channel_member USING btree (channel_id, partner_id) WHERE (partner_id IS NOT NULL);


--
-- Name: discuss_channel_member_seen_message_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_member_seen_message_id_idx ON public.discuss_channel_member USING btree (channel_id, partner_id, seen_message_id);


--
-- Name: discuss_channel_res_groups_re_res_groups_id_discuss_channel_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_res_groups_re_res_groups_id_discuss_channel_idx ON public.discuss_channel_res_groups_rel USING btree (res_groups_id, discuss_channel_id);


--
-- Name: discuss_channel_rtc_session__write_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_channel_rtc_session__write_date_index ON public.discuss_channel_rtc_session USING btree (write_date);


--
-- Name: discuss_voice_metadata__attachment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX discuss_voice_metadata__attachment_id_index ON public.discuss_voice_metadata USING btree (attachment_id);


--
-- Name: email_template_attachment_rel_attachment_id_email_template__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX email_template_attachment_rel_attachment_id_email_template__idx ON public.email_template_attachment_rel USING btree (attachment_id, email_template_id);


--
-- Name: employee_category_rel_category_id_employee_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX employee_category_rel_category_id_employee_id_idx ON public.employee_category_rel USING btree (category_id, employee_id);


--
-- Name: fetchmail_server__server_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX fetchmail_server__server_type_index ON public.fetchmail_server USING btree (server_type);


--
-- Name: fetchmail_server__state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX fetchmail_server__state_index ON public.fetchmail_server USING btree (state);


--
-- Name: gamification_badge_rule_badge_rel_badge2_id_badge1_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_badge_rule_badge_rel_badge2_id_badge1_id_idx ON public.gamification_badge_rule_badge_rel USING btree (badge2_id, badge1_id);


--
-- Name: gamification_badge_user__badge_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_badge_user__badge_id_index ON public.gamification_badge_user USING btree (badge_id);


--
-- Name: gamification_badge_user__employee_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_badge_user__employee_id_index ON public.gamification_badge_user USING btree (employee_id);


--
-- Name: gamification_badge_user__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_badge_user__user_id_index ON public.gamification_badge_user USING btree (user_id);


--
-- Name: gamification_challenge_users__res_users_id_gamification_cha_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_challenge_users__res_users_id_gamification_cha_idx ON public.gamification_challenge_users_rel USING btree (res_users_id, gamification_challenge_id);


--
-- Name: gamification_goal__challenge_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_goal__challenge_id_index ON public.gamification_goal USING btree (challenge_id);


--
-- Name: gamification_invited_user_ids_res_users_id_gamification_cha_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_invited_user_ids_res_users_id_gamification_cha_idx ON public.gamification_invited_user_ids_rel USING btree (res_users_id, gamification_challenge_id);


--
-- Name: gamification_karma_tracking__tracking_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_karma_tracking__tracking_date_index ON public.gamification_karma_tracking USING btree (tracking_date);


--
-- Name: gamification_karma_tracking__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX gamification_karma_tracking__user_id_index ON public.gamification_karma_tracking USING btree (user_id);


--
-- Name: header_footer_quotation_templ_sale_order_template_id_quotat_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX header_footer_quotation_templ_sale_order_template_id_quotat_idx ON public.header_footer_quotation_template_rel USING btree (sale_order_template_id, quotation_document_id);


--
-- Name: hr_department__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_department__company_id_index ON public.hr_department USING btree (company_id);


--
-- Name: hr_department__parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_department__parent_id_index ON public.hr_department USING btree (parent_id);


--
-- Name: hr_department__parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_department__parent_path_index ON public.hr_department USING btree (parent_path);


--
-- Name: hr_employee__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee__company_id_index ON public.hr_employee USING btree (company_id);


--
-- Name: hr_employee__message_main_attachment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee__message_main_attachment_id_index ON public.hr_employee USING btree (message_main_attachment_id) WHERE (message_main_attachment_id IS NOT NULL);


--
-- Name: hr_employee__resource_calendar_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee__resource_calendar_id_index ON public.hr_employee USING btree (resource_calendar_id);


--
-- Name: hr_employee__resource_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee__resource_id_index ON public.hr_employee USING btree (resource_id);


--
-- Name: hr_employee_hr_employee_cv_wi_hr_employee_id_hr_employee_cv_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee_hr_employee_cv_wi_hr_employee_id_hr_employee_cv_idx ON public.hr_employee_hr_employee_cv_wizard_rel USING btree (hr_employee_id, hr_employee_cv_wizard_id);


--
-- Name: hr_employee_hr_skill_rel_hr_skill_id_hr_employee_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee_hr_skill_rel_hr_skill_id_hr_employee_id_idx ON public.hr_employee_hr_skill_rel USING btree (hr_skill_id, hr_employee_id);


--
-- Name: hr_job__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_job__name_index ON public.hr_job USING gin (((jsonb_path_query_array(name, '$.*'::jsonpath))::text) public.gin_trgm_ops);


--
-- Name: hr_resume_line__employee_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_resume_line__employee_id_index ON public.hr_resume_line USING btree (employee_id);


--
-- Name: iap_account_res_company_rel_res_company_id_iap_account_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX iap_account_res_company_rel_res_company_id_iap_account_id_idx ON public.iap_account_res_company_rel USING btree (res_company_id, iap_account_id);


--
-- Name: iap_account_res_users_rel_res_users_id_iap_account_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX iap_account_res_users_rel_res_users_id_iap_account_id_idx ON public.iap_account_res_users_rel USING btree (res_users_id, iap_account_id);


--
-- Name: ir_act_server__model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_act_server__model_id_index ON public.ir_act_server USING btree (model_id);


--
-- Name: ir_act_server_group_rel_gid_act_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_act_server_group_rel_gid_act_id_idx ON public.ir_act_server_group_rel USING btree (gid, act_id);


--
-- Name: ir_act_server_res_partner_rel_res_partner_id_ir_act_server__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_act_server_res_partner_rel_res_partner_id_ir_act_server__idx ON public.ir_act_server_res_partner_rel USING btree (res_partner_id, ir_act_server_id);


--
-- Name: ir_act_server_webhook_field_rel_field_id_server_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_act_server_webhook_field_rel_field_id_server_id_idx ON public.ir_act_server_webhook_field_rel USING btree (field_id, server_id);


--
-- Name: ir_act_window_group_rel_gid_act_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_act_window_group_rel_gid_act_id_idx ON public.ir_act_window_group_rel USING btree (gid, act_id);


--
-- Name: ir_actions_todo__action_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_actions_todo__action_id_index ON public.ir_actions_todo USING btree (action_id);


--
-- Name: ir_attachment__original_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_attachment__original_id_index ON public.ir_attachment USING btree (original_id) WHERE (original_id IS NOT NULL);


--
-- Name: ir_attachment__store_fname_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_attachment__store_fname_index ON public.ir_attachment USING btree (store_fname);


--
-- Name: ir_attachment__url_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_attachment__url_index ON public.ir_attachment USING btree (url) WHERE (url IS NOT NULL);


--
-- Name: ir_attachment_res_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_attachment_res_idx ON public.ir_attachment USING btree (res_model, res_id);


--
-- Name: ir_cron_progress__cron_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_cron_progress__cron_id_index ON public.ir_cron_progress USING btree (cron_id);


--
-- Name: ir_cron_trigger__call_at_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_cron_trigger__call_at_index ON public.ir_cron_trigger USING btree (call_at);


--
-- Name: ir_cron_trigger__cron_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_cron_trigger__cron_id_index ON public.ir_cron_trigger USING btree (cron_id);


--
-- Name: ir_default__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_default__company_id_index ON public.ir_default USING btree (company_id);


--
-- Name: ir_default__field_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_default__field_id_index ON public.ir_default USING btree (field_id);


--
-- Name: ir_default__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_default__user_id_index ON public.ir_default USING btree (user_id);


--
-- Name: ir_embedded_actions_res_group_res_groups_id_ir_embedded_act_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_embedded_actions_res_group_res_groups_id_ir_embedded_act_idx ON public.ir_embedded_actions_res_groups_rel USING btree (res_groups_id, ir_embedded_actions_id);


--
-- Name: ir_exports__resource_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_exports__resource_index ON public.ir_exports USING btree (resource);


--
-- Name: ir_exports_line__export_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_exports_line__export_id_index ON public.ir_exports_line USING btree (export_id);


--
-- Name: ir_filters_name_model_uid_unique_action_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX ir_filters_name_model_uid_unique_action_index ON public.ir_filters USING btree (model_id, COALESCE(user_id, '-1'::integer), COALESCE(action_id, '-1'::integer), lower((name)::text), embedded_parent_res_id, COALESCE(embedded_action_id, '-1'::integer));


--
-- Name: ir_logging__dbname_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_logging__dbname_index ON public.ir_logging USING btree (dbname);


--
-- Name: ir_logging__level_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_logging__level_index ON public.ir_logging USING btree (level);


--
-- Name: ir_logging__type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_logging__type_index ON public.ir_logging USING btree (type);


--
-- Name: ir_mail_server__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_mail_server__name_index ON public.ir_mail_server USING btree (name);


--
-- Name: ir_model_access__group_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_access__group_id_index ON public.ir_model_access USING btree (group_id);


--
-- Name: ir_model_access__model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_access__model_id_index ON public.ir_model_access USING btree (model_id);


--
-- Name: ir_model_access__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_access__name_index ON public.ir_model_access USING btree (name);


--
-- Name: ir_model_constraint__model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_constraint__model_index ON public.ir_model_constraint USING btree (model);


--
-- Name: ir_model_constraint__module_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_constraint__module_index ON public.ir_model_constraint USING btree (module);


--
-- Name: ir_model_constraint__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_constraint__name_index ON public.ir_model_constraint USING btree (name);


--
-- Name: ir_model_constraint__type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_constraint__type_index ON public.ir_model_constraint USING btree (type);


--
-- Name: ir_model_data_model_res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_data_model_res_id_index ON public.ir_model_data USING btree (model, res_id);


--
-- Name: ir_model_data_module_name_uniq_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX ir_model_data_module_name_uniq_index ON public.ir_model_data USING btree (module, name);


--
-- Name: ir_model_fields__complete_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__complete_name_index ON public.ir_model_fields USING btree (complete_name);


--
-- Name: ir_model_fields__model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__model_id_index ON public.ir_model_fields USING btree (model_id);


--
-- Name: ir_model_fields__model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__model_index ON public.ir_model_fields USING btree (model);


--
-- Name: ir_model_fields__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__name_index ON public.ir_model_fields USING btree (name);


--
-- Name: ir_model_fields__state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__state_index ON public.ir_model_fields USING btree (state);


--
-- Name: ir_model_fields__website_form_blacklisted_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields__website_form_blacklisted_index ON public.ir_model_fields USING btree (website_form_blacklisted);


--
-- Name: ir_model_fields_group_rel_group_id_field_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields_group_rel_group_id_field_id_idx ON public.ir_model_fields_group_rel USING btree (group_id, field_id);


--
-- Name: ir_model_fields_selection__field_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_fields_selection__field_id_index ON public.ir_model_fields_selection USING btree (field_id);


--
-- Name: ir_model_relation__model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_relation__model_index ON public.ir_model_relation USING btree (model);


--
-- Name: ir_model_relation__module_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_relation__module_index ON public.ir_model_relation USING btree (module);


--
-- Name: ir_model_relation__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_relation__name_index ON public.ir_model_relation USING btree (name);


--
-- Name: ir_model_spreadsheet_dashboar_ir_model_id_spreadsheet_dashb_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_model_spreadsheet_dashboar_ir_model_id_spreadsheet_dashb_idx ON public.ir_model_spreadsheet_dashboard_rel USING btree (ir_model_id, spreadsheet_dashboard_id);


--
-- Name: ir_module_category__parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_module_category__parent_id_index ON public.ir_module_category USING btree (parent_id);


--
-- Name: ir_module_module__category_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_module_module__category_id_index ON public.ir_module_module USING btree (category_id);


--
-- Name: ir_module_module__state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_module_module__state_index ON public.ir_module_module USING btree (state);


--
-- Name: ir_module_module_dependency__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_module_module_dependency__name_index ON public.ir_module_module_dependency USING btree (name);


--
-- Name: ir_module_module_exclusion__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_module_module_exclusion__name_index ON public.ir_module_module_exclusion USING btree (name);


--
-- Name: ir_profile__session_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_profile__session_index ON public.ir_profile USING btree (session);


--
-- Name: ir_rule__model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_rule__model_id_index ON public.ir_rule USING btree (model_id);


--
-- Name: ir_rule__name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_rule__name_index ON public.ir_rule USING btree (name);


--
-- Name: ir_ui_menu__parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_menu__parent_id_index ON public.ir_ui_menu USING btree (parent_id);


--
-- Name: ir_ui_menu__parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_menu__parent_path_index ON public.ir_ui_menu USING btree (parent_path);


--
-- Name: ir_ui_menu_group_rel_gid_menu_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_menu_group_rel_gid_menu_id_idx ON public.ir_ui_menu_group_rel USING btree (gid, menu_id);


--
-- Name: ir_ui_view__inherit_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view__inherit_id_index ON public.ir_ui_view USING btree (inherit_id);


--
-- Name: ir_ui_view__key_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view__key_index ON public.ir_ui_view USING btree (key) WHERE (key IS NOT NULL);


--
-- Name: ir_ui_view__model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view__model_index ON public.ir_ui_view USING btree (model);


--
-- Name: ir_ui_view_custom__ref_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view_custom__ref_id_index ON public.ir_ui_view_custom USING btree (ref_id);


--
-- Name: ir_ui_view_custom__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view_custom__user_id_index ON public.ir_ui_view_custom USING btree (user_id);


--
-- Name: ir_ui_view_custom_user_id_ref_id; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view_custom_user_id_ref_id ON public.ir_ui_view_custom USING btree (user_id, ref_id);


--
-- Name: ir_ui_view_group_rel_group_id_view_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view_group_rel_group_id_view_id_idx ON public.ir_ui_view_group_rel USING btree (group_id, view_id);


--
-- Name: ir_ui_view_model_type_inherit_id; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_ui_view_model_type_inherit_id ON public.ir_ui_view USING btree (model, inherit_id);


--
-- Name: journal_account_control_rel_account_id_journal_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX journal_account_control_rel_account_id_journal_id_idx ON public.journal_account_control_rel USING btree (account_id, journal_id);


--
-- Name: l10n_es_edi_facturae_ac_role__l10n_es_edi_facturae_ac_role__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX l10n_es_edi_facturae_ac_role__l10n_es_edi_facturae_ac_role__idx ON public.l10n_es_edi_facturae_ac_role_type_res_partner_rel USING btree (l10n_es_edi_facturae_ac_role_type_id, res_partner_id);


--
-- Name: link_tracker__campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX link_tracker__campaign_id_index ON public.link_tracker USING btree (campaign_id) WHERE (campaign_id IS NOT NULL);


--
-- Name: link_tracker__medium_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX link_tracker__medium_id_index ON public.link_tracker USING btree (medium_id) WHERE (medium_id IS NOT NULL);


--
-- Name: link_tracker__source_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX link_tracker__source_id_index ON public.link_tracker USING btree (source_id) WHERE (source_id IS NOT NULL);


--
-- Name: link_tracker_click__campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX link_tracker_click__campaign_id_index ON public.link_tracker_click USING btree (campaign_id) WHERE (campaign_id IS NOT NULL);


--
-- Name: link_tracker_click__link_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX link_tracker_click__link_id_index ON public.link_tracker_click USING btree (link_id);


--
-- Name: lot_label_layout_stock_move_l_stock_move_line_id_lot_label__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX lot_label_layout_stock_move_l_stock_move_line_id_lot_label__idx ON public.lot_label_layout_stock_move_line_rel USING btree (stock_move_line_id, lot_label_layout_id);


--
-- Name: mail_activity__date_deadline_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity__date_deadline_index ON public.mail_activity USING btree (date_deadline);


--
-- Name: mail_activity__res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity__res_id_index ON public.mail_activity USING btree (res_id);


--
-- Name: mail_activity__res_model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity__res_model_id_index ON public.mail_activity USING btree (res_model_id);


--
-- Name: mail_activity__res_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity__res_model_index ON public.mail_activity USING btree (res_model);


--
-- Name: mail_activity__user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity__user_id_index ON public.mail_activity USING btree (user_id);


--
-- Name: mail_activity_plan_mail_activ_mail_activity_plan_id_mail_ac_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity_plan_mail_activ_mail_activity_plan_id_mail_ac_idx ON public.mail_activity_plan_mail_activity_schedule_rel USING btree (mail_activity_plan_id, mail_activity_schedule_id);


--
-- Name: mail_activity_rel_recommended_id_activity_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity_rel_recommended_id_activity_id_idx ON public.mail_activity_rel USING btree (recommended_id, activity_id);


--
-- Name: mail_activity_type__create_uid_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity_type__create_uid_index ON public.mail_activity_type USING btree (create_uid);


--
-- Name: mail_activity_type_mail_templ_mail_template_id_mail_activit_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_activity_type_mail_templ_mail_template_id_mail_activit_idx ON public.mail_activity_type_mail_template_rel USING btree (mail_template_id, mail_activity_type_id);


--
-- Name: mail_alias__alias_full_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_alias__alias_full_name_index ON public.mail_alias USING btree (alias_full_name) WHERE (alias_full_name IS NOT NULL);


--
-- Name: mail_alias_name_domain_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_alias_name_domain_unique ON public.mail_alias USING btree (alias_name, COALESCE(alias_domain_id, 0));


--
-- Name: mail_blacklist__email_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_blacklist__email_index ON public.mail_blacklist USING gin (email public.gin_trgm_ops);


--
-- Name: mail_canned_response__source_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_canned_response__source_index ON public.mail_canned_response USING gin (source public.gin_trgm_ops);


--
-- Name: mail_canned_response_res_grou_res_groups_id_mail_canned_res_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_canned_response_res_grou_res_groups_id_mail_canned_res_idx ON public.mail_canned_response_res_groups_rel USING btree (res_groups_id, mail_canned_response_id);


--
-- Name: mail_compose_message_ir_attachments_attachment_id_wizard_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_compose_message_ir_attachments_attachment_id_wizard_id_idx ON public.mail_compose_message_ir_attachments_rel USING btree (attachment_id, wizard_id);


--
-- Name: mail_compose_message_res_partner_rel_partner_id_wizard_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_compose_message_res_partner_rel_partner_id_wizard_id_idx ON public.mail_compose_message_res_partner_rel USING btree (partner_id, wizard_id);


--
-- Name: mail_followers__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_followers__partner_id_index ON public.mail_followers USING btree (partner_id);


--
-- Name: mail_followers__res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_followers__res_id_index ON public.mail_followers USING btree (res_id);


--
-- Name: mail_followers__res_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_followers__res_model_index ON public.mail_followers USING btree (res_model);


--
-- Name: mail_followers_mail_message_s_mail_message_subtype_id_mail__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_followers_mail_message_s_mail_message_subtype_id_mail__idx ON public.mail_followers_mail_message_subtype_rel USING btree (mail_message_subtype_id, mail_followers_id);


--
-- Name: mail_gateway_allowed__email_normalized_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_gateway_allowed__email_normalized_index ON public.mail_gateway_allowed USING btree (email_normalized);


--
-- Name: mail_link_preview__create_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_link_preview__create_date_index ON public.mail_link_preview USING btree (create_date);


--
-- Name: mail_link_preview__message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_link_preview__message_id_index ON public.mail_link_preview USING btree (message_id);


--
-- Name: mail_mail__mail_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_mail__mail_message_id_index ON public.mail_mail USING btree (mail_message_id);


--
-- Name: mail_mail_res_partner_rel_res_partner_id_mail_mail_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_mail_res_partner_rel_res_partner_id_mail_mail_id_idx ON public.mail_mail_res_partner_rel USING btree (res_partner_id, mail_mail_id);


--
-- Name: mail_message__author_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message__author_id_index ON public.mail_message USING btree (author_id);


--
-- Name: mail_message__mail_activity_type_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message__mail_activity_type_id_index ON public.mail_message USING btree (mail_activity_type_id) WHERE (mail_activity_type_id IS NOT NULL);


--
-- Name: mail_message__message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message__message_id_index ON public.mail_message USING btree (message_id);


--
-- Name: mail_message__parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message__parent_id_index ON public.mail_message USING btree (parent_id) WHERE (parent_id IS NOT NULL);


--
-- Name: mail_message__subtype_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message__subtype_id_index ON public.mail_message USING btree (subtype_id);


--
-- Name: mail_message_date_res_id_id_for_burndown_chart; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_date_res_id_id_for_burndown_chart ON public.mail_message USING btree (date, res_id, id) WHERE (((model)::text = 'project.task'::text) AND ((message_type)::text = 'notification'::text));


--
-- Name: mail_message_model_res_id_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_model_res_id_id_idx ON public.mail_message USING btree (model, res_id, id);


--
-- Name: mail_message_model_res_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_model_res_id_idx ON public.mail_message USING btree (model, res_id);


--
-- Name: mail_message_reaction_guest_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_message_reaction_guest_unique ON public.mail_message_reaction USING btree (message_id, content, guest_id) WHERE (guest_id IS NOT NULL);


--
-- Name: mail_message_reaction_partner_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_message_reaction_partner_unique ON public.mail_message_reaction USING btree (message_id, content, partner_id) WHERE (partner_id IS NOT NULL);


--
-- Name: mail_message_res_partner_rel_res_partner_id_mail_message_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_res_partner_rel_res_partner_id_mail_message_id_idx ON public.mail_message_res_partner_rel USING btree (res_partner_id, mail_message_id);


--
-- Name: mail_message_res_partner_star_res_partner_id_mail_message_i_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_res_partner_star_res_partner_id_mail_message_i_idx ON public.mail_message_res_partner_starred_rel USING btree (res_partner_id, mail_message_id);


--
-- Name: mail_message_translation__create_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_message_translation__create_date_index ON public.mail_message_translation USING btree (create_date);


--
-- Name: mail_message_translation_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_message_translation_unique ON public.mail_message_translation USING btree (message_id, target_lang);


--
-- Name: mail_notification__is_read_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__is_read_index ON public.mail_notification USING btree (is_read);


--
-- Name: mail_notification__letter_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__letter_id_index ON public.mail_notification USING btree (letter_id) WHERE (letter_id IS NOT NULL);


--
-- Name: mail_notification__mail_mail_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__mail_mail_id_index ON public.mail_notification USING btree (mail_mail_id);


--
-- Name: mail_notification__mail_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__mail_message_id_index ON public.mail_notification USING btree (mail_message_id);


--
-- Name: mail_notification__notification_status_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__notification_status_index ON public.mail_notification USING btree (notification_status);


--
-- Name: mail_notification__notification_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__notification_type_index ON public.mail_notification USING btree (notification_type);


--
-- Name: mail_notification__res_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__res_partner_id_index ON public.mail_notification USING btree (res_partner_id);


--
-- Name: mail_notification__sms_id_int_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification__sms_id_int_index ON public.mail_notification USING btree (sms_id_int) WHERE (sms_id_int IS NOT NULL);


--
-- Name: mail_notification_author_id_notification_status_failure; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification_author_id_notification_status_failure ON public.mail_notification USING btree (author_id, notification_status) WHERE ((notification_status)::text = ANY ((ARRAY['bounce'::character varying, 'exception'::character varying])::text[]));


--
-- Name: mail_notification_mail_resend_mail_notification_id_mail_res_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification_mail_resend_mail_notification_id_mail_res_idx ON public.mail_notification_mail_resend_message_rel USING btree (mail_notification_id, mail_resend_message_id);


--
-- Name: mail_notification_res_partner_id_is_read_notification_status_ma; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification_res_partner_id_is_read_notification_status_ma ON public.mail_notification USING btree (res_partner_id, is_read, notification_status, mail_message_id);


--
-- Name: mail_push_device__partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_push_device__partner_id_index ON public.mail_push_device USING btree (partner_id);


--
-- Name: mail_scheduled_message_res_pa_res_partner_id_mail_scheduled_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_scheduled_message_res_pa_res_partner_id_mail_scheduled_idx ON public.mail_scheduled_message_res_partner_rel USING btree (res_partner_id, mail_scheduled_message_id);


--
-- Name: mail_template__model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_template__model_index ON public.mail_template USING btree (model);


--
-- Name: mail_template_ir_actions_repo_ir_actions_report_id_mail_tem_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_template_ir_actions_repo_ir_actions_report_id_mail_tem_idx ON public.mail_template_ir_actions_report_rel USING btree (ir_actions_report_id, mail_template_id);


--
-- Name: mail_template_mail_template_r_mail_template_id_mail_templat_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_template_mail_template_r_mail_template_id_mail_templat_idx ON public.mail_template_mail_template_reset_rel USING btree (mail_template_id, mail_template_reset_id);


--
-- Name: mail_tracking_value__field_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_tracking_value__field_id_index ON public.mail_tracking_value USING btree (field_id);


--
-- Name: mail_tracking_value__mail_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_tracking_value__mail_message_id_index ON public.mail_tracking_value USING btree (mail_message_id);


--
-- Name: mail_tracking_value_mail_message_id_old_value_integer_task_stag; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_tracking_value_mail_message_id_old_value_integer_task_stag ON public.mail_tracking_value USING btree (mail_message_id, old_value_integer) WHERE (field_id = 8204);


--
-- Name: mail_wizard_invite_res_partne_res_partner_id_mail_wizard_in_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_wizard_invite_res_partne_res_partner_id_mail_wizard_in_idx ON public.mail_wizard_invite_res_partner_rel USING btree (res_partner_id, mail_wizard_invite_id);


--
-- Name: maintenance_request__equipment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX maintenance_request__equipment_id_index ON public.maintenance_request USING btree (equipment_id);


--
-- Name: maintenance_team_users_rel_res_users_id_maintenance_team_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX maintenance_team_users_rel_res_users_id_maintenance_team_id_idx ON public.maintenance_team_users_rel USING btree (res_users_id, maintenance_team_id);


--
-- Name: meeting_category_rel_type_id_event_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX meeting_category_rel_type_id_event_id_idx ON public.meeting_category_rel USING btree (type_id, event_id);


--
-- Name: merge_opportunity_rel_opportunity_id_merge_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX merge_opportunity_rel_opportunity_id_merge_id_idx ON public.merge_opportunity_rel USING btree (opportunity_id, merge_id);


--
-- Name: message_attachment_rel_attachment_id_message_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX message_attachment_rel_attachment_id_message_id_idx ON public.message_attachment_rel USING btree (attachment_id, message_id);


--
-- Name: module_country_country_id_module_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX module_country_country_id_module_id_idx ON public.module_country USING btree (country_id, module_id);


--
-- Name: mrp_account_wip_accounting_mr_mrp_production_id_mrp_account_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_account_wip_accounting_mr_mrp_production_id_mrp_account_idx ON public.mrp_account_wip_accounting_mrp_production_rel USING btree (mrp_production_id, mrp_account_wip_accounting_id);


--
-- Name: mrp_bom__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom__company_id_index ON public.mrp_bom USING btree (company_id);


--
-- Name: mrp_bom__product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom__product_id_index ON public.mrp_bom USING btree (product_id);


--
-- Name: mrp_bom__product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom__product_tmpl_id_index ON public.mrp_bom USING btree (product_tmpl_id);


--
-- Name: mrp_bom_byproduct__bom_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_byproduct__bom_id_index ON public.mrp_bom_byproduct USING btree (bom_id);


--
-- Name: mrp_bom_byproduct__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_byproduct__company_id_index ON public.mrp_bom_byproduct USING btree (company_id);


--
-- Name: mrp_bom_byproduct_product_tem_product_template_attribute_va_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_byproduct_product_tem_product_template_attribute_va_idx ON public.mrp_bom_byproduct_product_template_attribute_value_rel USING btree (product_template_attribute_value_id, mrp_bom_byproduct_id);


--
-- Name: mrp_bom_line__bom_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_line__bom_id_index ON public.mrp_bom_line USING btree (bom_id);


--
-- Name: mrp_bom_line__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_line__company_id_index ON public.mrp_bom_line USING btree (company_id);


--
-- Name: mrp_bom_line__product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_line__product_tmpl_id_index ON public.mrp_bom_line USING btree (product_tmpl_id);


--
-- Name: mrp_bom_line_product_template_product_template_attribute_va_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_bom_line_product_template_product_template_attribute_va_idx ON public.mrp_bom_line_product_template_attribute_value_rel USING btree (product_template_attribute_value_id, mrp_bom_line_id);


--
-- Name: mrp_consumption_warning_mrp_p_mrp_production_id_mrp_consump_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_consumption_warning_mrp_p_mrp_production_id_mrp_consump_idx ON public.mrp_consumption_warning_mrp_production_rel USING btree (mrp_production_id, mrp_consumption_warning_id);


--
-- Name: mrp_production__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__company_id_index ON public.mrp_production USING btree (company_id);


--
-- Name: mrp_production__date_start_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__date_start_index ON public.mrp_production USING btree (date_start);


--
-- Name: mrp_production__orderpoint_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__orderpoint_id_index ON public.mrp_production USING btree (orderpoint_id) WHERE (orderpoint_id IS NOT NULL);


--
-- Name: mrp_production__picking_type_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__picking_type_id_index ON public.mrp_production USING btree (picking_type_id);


--
-- Name: mrp_production__reservation_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__reservation_state_index ON public.mrp_production USING btree (reservation_state);


--
-- Name: mrp_production__state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production__state_index ON public.mrp_production USING btree (state);


--
-- Name: mrp_production_mrp_production_mrp_production_id_mrp_product_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production_mrp_production_mrp_production_id_mrp_product_idx ON public.mrp_production_mrp_production_backorder_rel USING btree (mrp_production_id, mrp_production_backorder_id);


--
-- Name: mrp_production_picking_label__mrp_production_id_picking_lab_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_production_picking_label__mrp_production_id_picking_lab_idx ON public.mrp_production_picking_label_type_rel USING btree (mrp_production_id, picking_label_type_id);


--
-- Name: mrp_routing_workcenter__bom_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_routing_workcenter__bom_id_index ON public.mrp_routing_workcenter USING btree (bom_id);


--
-- Name: mrp_routing_workcenter_dependenc_blocked_by_id_operation_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_routing_workcenter_dependenc_blocked_by_id_operation_id_idx ON public.mrp_routing_workcenter_dependencies_rel USING btree (blocked_by_id, operation_id);


--
-- Name: mrp_routing_workcenter_produc_product_template_attribute_va_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_routing_workcenter_produc_product_template_attribute_va_idx ON public.mrp_routing_workcenter_product_template_attribute_value_rel USING btree (product_template_attribute_value_id, mrp_routing_workcenter_id);


--
-- Name: mrp_unbuild__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_unbuild__company_id_index ON public.mrp_unbuild USING btree (company_id);


--
-- Name: mrp_workcenter__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter__company_id_index ON public.mrp_workcenter USING btree (company_id);


--
-- Name: mrp_workcenter__resource_calendar_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter__resource_calendar_id_index ON public.mrp_workcenter USING btree (resource_calendar_id);


--
-- Name: mrp_workcenter__resource_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter__resource_id_index ON public.mrp_workcenter USING btree (resource_id);


--
-- Name: mrp_workcenter_alternative_re_alternative_workcenter_id_wor_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_alternative_re_alternative_workcenter_id_wor_idx ON public.mrp_workcenter_alternative_rel USING btree (alternative_workcenter_id, workcenter_id);


--
-- Name: mrp_workcenter_analytic_distribution_accounts_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_analytic_distribution_accounts_gin_index ON public.mrp_workcenter USING gin (regexp_split_to_array((jsonb_path_query_array(analytic_distribution, '$.keyvalue()."key"'::jsonpath))::text, '\D+'::text));


--
-- Name: mrp_workcenter_mrp_workcenter_mrp_workcenter_tag_id_mrp_wor_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_mrp_workcenter_mrp_workcenter_tag_id_mrp_wor_idx ON public.mrp_workcenter_mrp_workcenter_tag_rel USING btree (mrp_workcenter_tag_id, mrp_workcenter_id);


--
-- Name: mrp_workcenter_productivity__company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_productivity__company_id_index ON public.mrp_workcenter_productivity USING btree (company_id);


--
-- Name: mrp_workcenter_productivity__workcenter_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_productivity__workcenter_id_index ON public.mrp_workcenter_productivity USING btree (workcenter_id);


--
-- Name: mrp_workcenter_productivity__workorder_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workcenter_productivity__workorder_id_index ON public.mrp_workcenter_productivity USING btree (workorder_id);


--
-- Name: mrp_workorder__production_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workorder__production_id_index ON public.mrp_workorder USING btree (production_id);


--
-- Name: mrp_workorder__state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workorder__state_index ON public.mrp_workorder USING btree (state);


--
-- Name: mrp_workorder_dependencies_rel_blocked_by_id_workorder_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workorder_dependencies_rel_blocked_by_id_workorder_id_idx ON public.mrp_workorder_dependencies_rel USING btree (blocked_by_id, workorder_id);


--
-- Name: mrp_workorder_mo_analytic_rel_account_analytic_line_id_mrp__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workorder_mo_analytic_rel_account_analytic_line_id_mrp__idx ON public.mrp_workorder_mo_analytic_rel USING btree (account_analytic_line_id, mrp_workorder_id);


--
-- Name: mrp_workorder_wc_analytic_rel_account_analytic_line_id_mrp__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mrp_workorder_wc_analytic_rel_account_analytic_line_id_mrp__idx ON public.mrp_workorder_wc_analytic_rel USING btree (account_analytic_line_id, mrp_workorder_id);


--
-- Name: onboarding_onboarding_onboard_onboarding_onboarding_step_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX onboarding_onboarding_onboard_onboarding_onboarding_step_id_idx ON public.onboarding_onboarding_onboarding_onboarding_step_rel USING btree (onboarding_onboarding_step_id, onboarding_onboarding_id);


--
-- Name: onboarding_progress_onboardin_onboarding_progress_step_id_o_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX onboarding_progress_onboardin_onboarding_progress_step_id_o_idx ON public.onboarding_progress_onboarding_progress_step_rel USING btree (onboarding_progress_step_id, onboarding_progress_id);


--
-- Name: onboarding_progress_onboarding_company_uniq; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX onboarding_progress_onboarding_company_uniq ON public.onboarding_progress USING btree (onboarding_id, COALESCE(company_id, 0));


--
-- Name: onboarding_progress_step_company_uniq; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX onboarding_progress_step_company_uniq ON public.onboarding_progress_step USING btree (step_id, COALESCE(company_id, 0));


--
-- Name: payment_capture_wizard_paymen_payment_transaction_id_paymen_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_capture_wizard_paymen_payment_transaction_id_paymen_idx ON public.payment_capture_wizard_payment_transaction_rel USING btree (payment_transaction_id, payment_capture_wizard_id);


--
