-- 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: 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 (emp_id, category_id);


--
-- Name: expense_tax expense_tax_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.expense_tax
    ADD CONSTRAINT expense_tax_pkey PRIMARY KEY (expense_id, tax_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: hr_contract hr_contract_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_contract
    ADD CONSTRAINT hr_contract_pkey PRIMARY KEY (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_mail_channel_rel hr_department_mail_channel_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_department_mail_channel_rel
    ADD CONSTRAINT hr_department_mail_channel_rel_pkey PRIMARY KEY (mail_channel_id, hr_department_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_hr_plan_wizard_rel hr_employee_hr_plan_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_employee_hr_plan_wizard_rel
    ADD CONSTRAINT hr_employee_hr_plan_wizard_rel_pkey PRIMARY KEY (employee_id, plan_wizard_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 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_expense_approve_duplicate_hr_expense_sheet_rel hr_expense_approve_duplicate_hr_expense_sheet_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_approve_duplicate_hr_expense_sheet_rel
    ADD CONSTRAINT hr_expense_approve_duplicate_hr_expense_sheet_rel_pkey PRIMARY KEY (hr_expense_approve_duplicate_id, hr_expense_sheet_id);


--
-- Name: hr_expense_approve_duplicate hr_expense_approve_duplicate_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_approve_duplicate
    ADD CONSTRAINT hr_expense_approve_duplicate_pkey PRIMARY KEY (id);


--
-- Name: hr_expense_hr_expense_approve_duplicate_rel hr_expense_hr_expense_approve_duplicate_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_hr_expense_approve_duplicate_rel
    ADD CONSTRAINT hr_expense_hr_expense_approve_duplicate_rel_pkey PRIMARY KEY (hr_expense_approve_duplicate_id, hr_expense_id);


--
-- Name: hr_expense_hr_expense_refuse_wizard_rel hr_expense_hr_expense_refuse_wizard_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_hr_expense_refuse_wizard_rel
    ADD CONSTRAINT hr_expense_hr_expense_refuse_wizard_rel_pkey PRIMARY KEY (hr_expense_refuse_wizard_id, hr_expense_id);


--
-- Name: hr_expense hr_expense_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense
    ADD CONSTRAINT hr_expense_pkey PRIMARY KEY (id);


--
-- Name: hr_expense_refuse_wizard hr_expense_refuse_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_refuse_wizard
    ADD CONSTRAINT hr_expense_refuse_wizard_pkey PRIMARY KEY (id);


--
-- Name: hr_expense_sheet hr_expense_sheet_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_sheet
    ADD CONSTRAINT hr_expense_sheet_pkey PRIMARY KEY (id);


--
-- Name: hr_expense_split hr_expense_split_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_split
    ADD CONSTRAINT hr_expense_split_pkey PRIMARY KEY (id);


--
-- Name: hr_expense_split_wizard hr_expense_split_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_expense_split_wizard
    ADD CONSTRAINT hr_expense_split_wizard_pkey PRIMARY KEY (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_payroll_structure_type hr_payroll_structure_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_payroll_structure_type
    ADD CONSTRAINT hr_payroll_structure_type_pkey PRIMARY KEY (id);


--
-- Name: hr_plan_activity_type hr_plan_activity_type_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_plan_activity_type
    ADD CONSTRAINT hr_plan_activity_type_pkey PRIMARY KEY (id);


--
-- Name: hr_plan hr_plan_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_plan
    ADD CONSTRAINT hr_plan_pkey PRIMARY KEY (id);


--
-- Name: hr_plan_wizard hr_plan_wizard_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.hr_plan_wizard
    ADD CONSTRAINT hr_plan_wizard_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: im_livechat_channel_country_rel im_livechat_channel_country_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.im_livechat_channel_country_rel
    ADD CONSTRAINT im_livechat_channel_country_rel_pkey PRIMARY KEY (channel_id, country_id);


--
-- Name: im_livechat_channel_im_user im_livechat_channel_im_user_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.im_livechat_channel_im_user
    ADD CONSTRAINT im_livechat_channel_im_user_pkey PRIMARY KEY (channel_id, user_id);


--
-- Name: im_livechat_channel im_livechat_channel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.im_livechat_channel
    ADD CONSTRAINT im_livechat_channel_pkey PRIMARY KEY (id);


--
-- Name: im_livechat_channel_rule im_livechat_channel_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.im_livechat_channel_rule
    ADD CONSTRAINT im_livechat_channel_rule_pkey PRIMARY KEY (id);


--
-- 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_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_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_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_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_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_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_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, 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, 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 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_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_property ir_property_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_property
    ADD CONSTRAINT ir_property_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 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_server_object_lines ir_server_object_lines_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.ir_server_object_lines
    ADD CONSTRAINT ir_server_object_lines_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: 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_picking_rel lot_label_layout_stock_picking_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.lot_label_layout_stock_picking_rel
    ADD CONSTRAINT lot_label_layout_stock_picking_rel_pkey PRIMARY KEY (lot_label_layout_id, stock_picking_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_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_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 mail_alias_alias_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_alias
    ADD CONSTRAINT mail_alias_alias_unique UNIQUE (alias_name);


--
-- Name: CONSTRAINT mail_alias_alias_unique ON mail_alias; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_alias_alias_unique ON public.mail_alias IS 'UNIQUE(alias_name)';


--
-- 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_channel_member mail_channel_member_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel_member
    ADD CONSTRAINT mail_channel_member_pkey PRIMARY KEY (id);


--
-- Name: mail_channel mail_channel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel
    ADD CONSTRAINT mail_channel_pkey PRIMARY KEY (id);


--
-- Name: mail_channel_res_groups_rel mail_channel_res_groups_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel_res_groups_rel
    ADD CONSTRAINT mail_channel_res_groups_rel_pkey PRIMARY KEY (mail_channel_id, res_groups_id);


--
-- Name: mail_channel_rtc_session mail_channel_rtc_session_channel_member_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel_rtc_session
    ADD CONSTRAINT mail_channel_rtc_session_channel_member_unique UNIQUE (channel_member_id);


--
-- Name: CONSTRAINT mail_channel_rtc_session_channel_member_unique ON mail_channel_rtc_session; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_channel_rtc_session_channel_member_unique ON public.mail_channel_rtc_session IS 'UNIQUE(channel_member_id)';


--
-- Name: mail_channel_rtc_session mail_channel_rtc_session_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel_rtc_session
    ADD CONSTRAINT mail_channel_rtc_session_pkey PRIMARY KEY (id);


--
-- Name: mail_channel mail_channel_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_channel
    ADD CONSTRAINT mail_channel_uuid_unique UNIQUE (uuid);


--
-- Name: CONSTRAINT mail_channel_uuid_unique ON mail_channel; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mail_channel_uuid_unique ON public.mail_channel IS 'UNIQUE(uuid)';


--
-- 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_mailing_list_rel mail_compose_message_mailing_list_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_compose_message_mailing_list_rel
    ADD CONSTRAINT mail_compose_message_mailing_list_rel_pkey PRIMARY KEY (mail_compose_message_id, mailing_list_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_mass_mailing_list_rel mail_mass_mailing_list_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_mass_mailing_list_rel
    ADD CONSTRAINT mail_mass_mailing_list_rel_pkey PRIMARY KEY (mailing_list_id, mailing_mailing_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_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_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_shortcode mail_shortcode_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mail_shortcode
    ADD CONSTRAINT mail_shortcode_pkey PRIMARY KEY (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: mailing_contact_import_mailing_list_rel mailing_contact_import_mailing_list_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_import_mailing_list_rel
    ADD CONSTRAINT mailing_contact_import_mailing_list_rel_pkey PRIMARY KEY (mailing_contact_import_id, mailing_list_id);


--
-- Name: mailing_contact_import mailing_contact_import_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_import
    ADD CONSTRAINT mailing_contact_import_pkey PRIMARY KEY (id);


--
-- Name: mailing_contact_list_rel mailing_contact_list_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_list_rel
    ADD CONSTRAINT mailing_contact_list_rel_pkey PRIMARY KEY (id);


--
-- Name: mailing_contact_list_rel mailing_contact_list_rel_unique_contact_list; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_list_rel
    ADD CONSTRAINT mailing_contact_list_rel_unique_contact_list UNIQUE (contact_id, list_id);


--
-- Name: CONSTRAINT mailing_contact_list_rel_unique_contact_list ON mailing_contact_list_rel; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT mailing_contact_list_rel_unique_contact_list ON public.mailing_contact_list_rel IS 'unique (contact_id, list_id)';


--
-- Name: mailing_contact_mailing_contact_to_list_rel mailing_contact_mailing_contact_to_list_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_mailing_contact_to_list_rel
    ADD CONSTRAINT mailing_contact_mailing_contact_to_list_rel_pkey PRIMARY KEY (mailing_contact_to_list_id, mailing_contact_id);


--
-- Name: mailing_contact mailing_contact_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact
    ADD CONSTRAINT mailing_contact_pkey PRIMARY KEY (id);


--
-- Name: mailing_contact_res_partner_category_rel mailing_contact_res_partner_category_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_res_partner_category_rel
    ADD CONSTRAINT mailing_contact_res_partner_category_rel_pkey PRIMARY KEY (mailing_contact_id, res_partner_category_id);


--
-- Name: mailing_contact_to_list mailing_contact_to_list_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_contact_to_list
    ADD CONSTRAINT mailing_contact_to_list_pkey PRIMARY KEY (id);


--
-- Name: mailing_filter mailing_filter_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_filter
    ADD CONSTRAINT mailing_filter_pkey PRIMARY KEY (id);


--
-- Name: mailing_list_mailing_list_merge_rel mailing_list_mailing_list_merge_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_list_mailing_list_merge_rel
    ADD CONSTRAINT mailing_list_mailing_list_merge_rel_pkey PRIMARY KEY (mailing_list_merge_id, mailing_list_id);


--
-- Name: mailing_list_merge mailing_list_merge_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_list_merge
    ADD CONSTRAINT mailing_list_merge_pkey PRIMARY KEY (id);


--
-- Name: mailing_list mailing_list_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_list
    ADD CONSTRAINT mailing_list_pkey PRIMARY KEY (id);


--
-- Name: mailing_mailing mailing_mailing_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_mailing
    ADD CONSTRAINT mailing_mailing_pkey PRIMARY KEY (id);


--
-- Name: mailing_mailing_schedule_date mailing_mailing_schedule_date_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_mailing_schedule_date
    ADD CONSTRAINT mailing_mailing_schedule_date_pkey PRIMARY KEY (id);


--
-- Name: mailing_mailing_test mailing_mailing_test_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_mailing_test
    ADD CONSTRAINT mailing_mailing_test_pkey PRIMARY KEY (id);


--
-- Name: mailing_trace mailing_trace_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mailing_trace
    ADD CONSTRAINT mailing_trace_pkey PRIMARY KEY (id);


--
-- Name: mass_mailing_ir_attachments_rel mass_mailing_ir_attachments_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.mass_mailing_ir_attachments_rel
    ADD CONSTRAINT mass_mailing_ir_attachments_rel_pkey PRIMARY KEY (mass_mailing_id, attachment_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: note_note note_note_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_note
    ADD CONSTRAINT note_note_pkey PRIMARY KEY (id);


--
-- Name: note_stage note_stage_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_stage
    ADD CONSTRAINT note_stage_pkey PRIMARY KEY (id);


--
-- Name: note_stage_rel note_stage_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_stage_rel
    ADD CONSTRAINT note_stage_rel_pkey PRIMARY KEY (note_id, stage_id);


--
-- Name: note_tag note_tag_name_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_tag
    ADD CONSTRAINT note_tag_name_uniq UNIQUE (name);


--
-- Name: CONSTRAINT note_tag_name_uniq ON note_tag; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT note_tag_name_uniq ON public.note_tag IS 'unique (name)';


--
-- Name: note_tag note_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_tag
    ADD CONSTRAINT note_tag_pkey PRIMARY KEY (id);


--
-- Name: note_tags_rel note_tags_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.note_tags_rel
    ADD CONSTRAINT note_tags_rel_pkey PRIMARY KEY (note_id, tag_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_icon_payment_provider_rel payment_icon_payment_provider_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_icon_payment_provider_rel
    ADD CONSTRAINT payment_icon_payment_provider_rel_pkey PRIMARY KEY (payment_provider_id, payment_icon_id);


--
-- Name: payment_icon payment_icon_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.payment_icon
    ADD CONSTRAINT payment_icon_pkey PRIMARY KEY (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_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: 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: 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_attribute_value product_attribute_value_value_company_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_attribute_value
    ADD CONSTRAINT product_attribute_value_value_company_uniq UNIQUE (name, attribute_id);


--
-- Name: CONSTRAINT product_attribute_value_value_company_uniq ON product_attribute_value; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT product_attribute_value_value_company_uniq ON public.product_attribute_value IS 'unique (name, attribute_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_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_line_rel product_label_layout_stock_move_line_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_label_layout_stock_move_line_rel
    ADD CONSTRAINT product_label_layout_stock_move_line_rel_pkey PRIMARY KEY (product_label_layout_id, stock_move_line_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_replenish_stock_route_rel product_replenish_stock_route_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.product_replenish_stock_route_rel
    ADD CONSTRAINT product_replenish_stock_route_rel_pkey PRIMARY KEY (product_replenish_id, stock_route_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_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 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_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 (type_id, project_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: 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: 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_installer res_config_installer_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.res_config_installer
    ADD CONSTRAINT res_config_installer_pkey PRIMARY KEY (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_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_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: 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_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_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_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: 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_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: snailmail_confirm_invoice snailmail_confirm_invoice_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.snailmail_confirm_invoice
    ADD CONSTRAINT snailmail_confirm_invoice_pkey PRIMARY KEY (id);


--
-- 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: stock_assign_serial stock_assign_serial_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_assign_serial
    ADD CONSTRAINT stock_assign_serial_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_immediate_transfer_line stock_immediate_transfer_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_immediate_transfer_line
    ADD CONSTRAINT stock_immediate_transfer_line_pkey PRIMARY KEY (id);


--
-- Name: stock_immediate_transfer stock_immediate_transfer_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_immediate_transfer
    ADD CONSTRAINT stock_immediate_transfer_pkey PRIMARY KEY (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_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_transfer_rel stock_picking_transfer_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_picking_transfer_rel
    ADD CONSTRAINT stock_picking_transfer_rel_pkey PRIMARY KEY (stock_immediate_transfer_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_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_scheduler_compute stock_scheduler_compute_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.stock_scheduler_compute
    ADD CONSTRAINT stock_scheduler_compute_pkey PRIMARY KEY (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_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_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_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_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: survey_invite_partner_ids survey_invite_partner_ids_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_invite_partner_ids
    ADD CONSTRAINT survey_invite_partner_ids_pkey PRIMARY KEY (invite_id, partner_id);


--
-- Name: survey_invite survey_invite_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_invite
    ADD CONSTRAINT survey_invite_pkey PRIMARY KEY (id);


--
-- Name: survey_mail_compose_message_ir_attachments_rel survey_mail_compose_message_ir_attachments_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_mail_compose_message_ir_attachments_rel
    ADD CONSTRAINT survey_mail_compose_message_ir_attachments_rel_pkey PRIMARY KEY (wizard_id, attachment_id);


--
-- Name: survey_question_answer survey_question_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_question_answer
    ADD CONSTRAINT survey_question_answer_pkey PRIMARY KEY (id);


--
-- Name: survey_question survey_question_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_question
    ADD CONSTRAINT survey_question_pkey PRIMARY KEY (id);


--
-- Name: survey_question_survey_user_input_rel survey_question_survey_user_input_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_question_survey_user_input_rel
    ADD CONSTRAINT survey_question_survey_user_input_rel_pkey PRIMARY KEY (survey_user_input_id, survey_question_id);


--
-- Name: survey_survey survey_survey_access_token_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_survey
    ADD CONSTRAINT survey_survey_access_token_unique UNIQUE (access_token);


--
-- Name: CONSTRAINT survey_survey_access_token_unique ON survey_survey; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT survey_survey_access_token_unique ON public.survey_survey IS 'unique(access_token)';


--
-- Name: survey_survey survey_survey_badge_uniq; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_survey
    ADD CONSTRAINT survey_survey_badge_uniq UNIQUE (certification_badge_id);


--
-- Name: CONSTRAINT survey_survey_badge_uniq ON survey_survey; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT survey_survey_badge_uniq ON public.survey_survey IS 'unique (certification_badge_id)';


--
-- Name: survey_survey survey_survey_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_survey
    ADD CONSTRAINT survey_survey_pkey PRIMARY KEY (id);


--
-- Name: survey_survey survey_survey_session_code_unique; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_survey
    ADD CONSTRAINT survey_survey_session_code_unique UNIQUE (session_code);


--
-- Name: CONSTRAINT survey_survey_session_code_unique ON survey_survey; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT survey_survey_session_code_unique ON public.survey_survey IS 'unique(session_code)';


--
-- Name: survey_user_input_line survey_user_input_line_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_user_input_line
    ADD CONSTRAINT survey_user_input_line_pkey PRIMARY KEY (id);


--
-- Name: survey_user_input survey_user_input_pkey; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_user_input
    ADD CONSTRAINT survey_user_input_pkey PRIMARY KEY (id);


--
-- Name: survey_user_input survey_user_input_unique_token; Type: CONSTRAINT; Schema: public; Owner: odoo
--

ALTER TABLE ONLY public.survey_user_input
    ADD CONSTRAINT survey_user_input_unique_token UNIQUE (access_token);


--
-- Name: CONSTRAINT survey_user_input_unique_token ON survey_user_input; Type: COMMENT; Schema: public; Owner: odoo
--

COMMENT ON CONSTRAINT survey_user_input_unique_token ON public.survey_user_input IS 'UNIQUE (access_token)';


--
-- 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: 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: 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: 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 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 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_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_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_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_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_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_account_template_acco_account_account_tag_id_accoun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_template_acco_account_account_tag_id_accoun_idx ON public.account_account_template_account_tag USING btree (account_account_tag_id, account_account_template_id);


--
-- Name: account_account_template_tax_rel_tax_id_account_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_account_template_tax_rel_tax_id_account_id_idx ON public.account_account_template_tax_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_distribution_model_analytic_distribution_gin_i; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_analytic_distribution_model_analytic_distribution_gin_i ON public.account_analytic_distribution_model USING gin (analytic_distribution);


--
-- 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_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_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_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_first_line_index_index ON public.account_bank_statement USING btree (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_line_internal_index_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_bank_statement_line_internal_index_index ON public.account_bank_statement_line USING btree (internal_index);


--
-- 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_edi_document_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_edi_document_move_id_index ON public.account_edi_document USING btree (move_id);


--
-- Name: account_edi_format_account_jo_account_edi_format_id_account_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_edi_format_account_jo_account_edi_format_id_account_idx ON public.account_edi_format_account_journal_rel USING btree (account_edi_format_id, account_journal_id);


--
-- 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_fiscal_position_templ_res_country_state_id_account__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_fiscal_position_templ_res_country_state_id_account__idx ON public.account_fiscal_position_template_res_country_state_rel USING btree (res_country_state_id, account_fiscal_position_template_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_group_parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_group_parent_path_index ON public.account_group USING btree (parent_path);


--
-- 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_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_r_idx1; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_journal_account_recon_account_journal_id_account_r_idx1 ON public.account_journal_account_reconcile_model_template_rel USING btree (account_journal_id, account_reconcile_model_template_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_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_move_account_invoice__account_move_id_account_invoi_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_account_invoice__account_move_id_account_invoi_idx ON public.account_move_account_invoice_send_rel USING btree (account_move_id, account_invoice_send_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_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_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_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_line_account_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_account_id_index ON public.account_move_line USING btree (account_id);


--
-- 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_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_line_analytic_distribution_gin_index ON public.account_move_line USING gin (analytic_distribution);


--
-- 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_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_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_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_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_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_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_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_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_payment_id_index ON public.account_move USING btree (payment_id) WHERE (payment_id IS NOT NULL);


--
-- 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_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_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_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_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_sequence_index3; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_sequence_index3 ON public.account_move USING btree (journal_id, sequence_prefix DESC, ((sequence_number + 1)) DESC);


--
-- 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_to_check_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_move_to_check_idx ON public.account_move USING btree (journal_id) WHERE (to_check = true);


--
-- 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_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_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_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_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_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_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_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_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__account_tax_template_id_accou_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_line__account_tax_template_id_accou_idx ON public.account_reconcile_model_line_template_account_tax_template_rel USING btree (account_tax_template_id, account_reconcile_model_line_template_id);


--
-- Name: account_reconcile_model_line_analytic_distribution_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_line_analytic_distribution_gin_index ON public.account_reconcile_model_line USING gin (analytic_distribution);


--
-- 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_reconcile_model_templ_res_partner_category_id_accou_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_templ_res_partner_category_id_accou_idx ON public.account_reconcile_model_template_res_partner_category_rel USING btree (res_partner_category_id, account_reconcile_model_template_id);


--
-- Name: account_reconcile_model_templ_res_partner_id_account_reconc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_reconcile_model_templ_res_partner_id_account_reconc_idx ON public.account_reconcile_model_template_res_partner_rel USING btree (res_partner_id, account_reconcile_model_template_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_hr_expense_split__account_tax_id_hr_expense_spl_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_hr_expense_split__account_tax_id_hr_expense_spl_idx ON public.account_tax_hr_expense_split_rel USING btree (account_tax_id, hr_expense_split_id);


--
-- 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_rep_template_minu_account_report_expression_id__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_rep_template_minu_account_report_expression_id__idx ON public.account_tax_rep_template_minus USING btree (account_report_expression_id, account_tax_repartition_line_template_id);


--
-- Name: account_tax_rep_template_plus_account_report_expression_id__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_rep_template_plus_account_report_expression_id__idx ON public.account_tax_rep_template_plus USING btree (account_report_expression_id, account_tax_repartition_line_template_id);


--
-- Name: account_tax_repartition_finan_account_account_tag_id_accoun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_repartition_finan_account_account_tag_id_accoun_idx ON public.account_tax_repartition_financial_tags USING btree (account_account_tag_id, account_tax_repartition_line_template_id);


--
-- Name: account_tax_sale_advance_paym_account_tax_id_sale_advance_p_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_sale_advance_paym_account_tax_id_sale_advance_p_idx ON public.account_tax_sale_advance_payment_inv_rel USING btree (account_tax_id, sale_advance_payment_inv_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: account_tax_template_filiation_rel_child_tax_parent_tax_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tax_template_filiation_rel_child_tax_parent_tax_idx ON public.account_tax_template_filiation_rel USING btree (child_tax, parent_tax);


--
-- Name: account_tour_upload_bill_ir_a_ir_attachment_id_account_tour_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX account_tour_upload_bill_ir_a_ir_attachment_id_account_tour_idx ON public.account_tour_upload_bill_ir_attachments_rel USING btree (ir_attachment_id, account_tour_upload_bill_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: 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: chatbot_script_answer_chatbot_chatbot_script_answer_id_chat_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX chatbot_script_answer_chatbot_chatbot_script_answer_id_chat_idx ON public.chatbot_script_answer_chatbot_script_step_rel USING btree (chatbot_script_answer_id, chatbot_script_step_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_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_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_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_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_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_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_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_priority_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX crm_lead_priority_index ON public.crm_lead USING btree (priority);


--
-- 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_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_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: 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_emp_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX employee_category_rel_category_id_emp_id_idx ON public.employee_category_rel USING btree (category_id, emp_id);


--
-- Name: expense_tax_tax_id_expense_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX expense_tax_tax_id_expense_id_idx ON public.expense_tax USING btree (tax_id, expense_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_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: hr_contract_date_start_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_contract_date_start_index ON public.hr_contract USING btree (date_start);


--
-- Name: hr_contract_resource_calendar_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_contract_resource_calendar_id_index ON public.hr_contract USING btree (resource_calendar_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_mail_channel_re_hr_department_id_mail_channel_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_department_mail_channel_re_hr_department_id_mail_channel_idx ON public.hr_department_mail_channel_rel USING btree (hr_department_id, mail_channel_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_hr_plan_wizard_rel_plan_wizard_id_employee_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_employee_hr_plan_wizard_rel_plan_wizard_id_employee_id_idx ON public.hr_employee_hr_plan_wizard_rel USING btree (plan_wizard_id, employee_id);


--
-- 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_expense_analytic_distribution_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_analytic_distribution_gin_index ON public.hr_expense USING gin (analytic_distribution);


--
-- Name: hr_expense_approve_duplicate__hr_expense_sheet_id_hr_expens_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_approve_duplicate__hr_expense_sheet_id_hr_expens_idx ON public.hr_expense_approve_duplicate_hr_expense_sheet_rel USING btree (hr_expense_sheet_id, hr_expense_approve_duplicate_id);


--
-- Name: hr_expense_hr_expense_approve_hr_expense_id_hr_expense_appr_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_hr_expense_approve_hr_expense_id_hr_expense_appr_idx ON public.hr_expense_hr_expense_approve_duplicate_rel USING btree (hr_expense_id, hr_expense_approve_duplicate_id);


--
-- Name: hr_expense_hr_expense_refuse__hr_expense_id_hr_expense_refu_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_hr_expense_refuse__hr_expense_id_hr_expense_refu_idx ON public.hr_expense_hr_expense_refuse_wizard_rel USING btree (hr_expense_id, hr_expense_refuse_wizard_id);


--
-- Name: hr_expense_sheet_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_sheet_state_index ON public.hr_expense_sheet USING btree (state);


--
-- Name: hr_expense_split_analytic_distribution_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_split_analytic_distribution_gin_index ON public.hr_expense_split USING gin (analytic_distribution);


--
-- Name: hr_expense_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX hr_expense_state_index ON public.hr_expense USING btree (state);


--
-- 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: 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: im_livechat_channel_country_rel_country_id_channel_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX im_livechat_channel_country_rel_country_id_channel_id_idx ON public.im_livechat_channel_country_rel USING btree (country_id, channel_id);


--
-- Name: im_livechat_channel_im_user_user_id_channel_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX im_livechat_channel_im_user_user_id_channel_id_idx ON public.im_livechat_channel_im_user USING btree (user_id, channel_id);


--
-- Name: im_livechat_channel_is_published_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX im_livechat_channel_is_published_index ON public.im_livechat_channel USING btree (is_published);


--
-- 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_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_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_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_checksum_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_attachment_checksum_index ON public.ir_attachment USING btree (checksum);


--
-- 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_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_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_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_exports_resource_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_exports_resource_index ON public.ir_exports USING btree (resource);


--
-- 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));


--
-- 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_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_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_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_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_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_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_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_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_profile_session_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_profile_session_index ON public.ir_profile USING btree (session);


--
-- Name: ir_property_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_property_company_id_index ON public.ir_property USING btree (company_id);


--
-- Name: ir_property_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_property_name_index ON public.ir_property USING btree (name);


--
-- Name: ir_property_res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_property_res_id_index ON public.ir_property USING btree (res_id);


--
-- Name: ir_property_type_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX ir_property_type_index ON public.ir_property USING btree (type);


--
-- Name: ir_property_unique_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX ir_property_unique_index ON public.ir_property USING btree (fields_id, COALESCE(company_id, 0), COALESCE(res_id, ''::character varying));


--
-- 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_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_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_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_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_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: 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_pickin_stock_picking_id_lot_label_la_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX lot_label_layout_stock_pickin_stock_picking_id_lot_label_la_idx ON public.lot_label_layout_stock_picking_rel USING btree (stock_picking_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_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_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_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_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_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_channel_livechat_channel_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_livechat_channel_id_index ON public.mail_channel USING btree (livechat_channel_id) WHERE (livechat_channel_id IS NOT NULL);


--
-- Name: mail_channel_livechat_visitor_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_livechat_visitor_id_index ON public.mail_channel USING btree (livechat_visitor_id) WHERE (livechat_visitor_id IS NOT NULL);


--
-- Name: mail_channel_member_fetched_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_member_fetched_message_id_index ON public.mail_channel_member USING btree (fetched_message_id) WHERE (fetched_message_id IS NOT NULL);


--
-- Name: mail_channel_member_guest_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_member_guest_id_index ON public.mail_channel_member USING btree (guest_id);


--
-- Name: mail_channel_member_guest_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_channel_member_guest_unique ON public.mail_channel_member USING btree (channel_id, guest_id) WHERE (guest_id IS NOT NULL);


--
-- Name: mail_channel_member_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_member_partner_id_index ON public.mail_channel_member USING btree (partner_id);


--
-- Name: mail_channel_member_partner_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX mail_channel_member_partner_unique ON public.mail_channel_member USING btree (channel_id, partner_id) WHERE (partner_id IS NOT NULL);


--
-- Name: mail_channel_member_seen_message_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_member_seen_message_id_idx ON public.mail_channel_member USING btree (channel_id, partner_id, seen_message_id);


--
-- Name: mail_channel_member_seen_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_member_seen_message_id_index ON public.mail_channel_member USING btree (seen_message_id) WHERE (seen_message_id IS NOT NULL);


--
-- Name: mail_channel_res_groups_rel_res_groups_id_mail_channel_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_res_groups_rel_res_groups_id_mail_channel_id_idx ON public.mail_channel_res_groups_rel USING btree (res_groups_id, mail_channel_id);


--
-- Name: mail_channel_rtc_session_write_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_channel_rtc_session_write_date_index ON public.mail_channel_rtc_session USING btree (write_date);


--
-- 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_mailing__mailing_list_id_mail_compose__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_compose_message_mailing__mailing_list_id_mail_compose__idx ON public.mail_compose_message_mailing_list_rel USING btree (mailing_list_id, mail_compose_message_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_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_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_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_mass_mailing_list_rel_mailing_mailing_id_mailing_list__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_mass_mailing_list_rel_mailing_mailing_id_mailing_list__idx ON public.mail_mass_mailing_list_rel USING btree (mailing_mailing_id, mailing_list_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_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_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);


--
-- 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_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_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_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_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_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_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_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_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_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_notification_sms_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_notification_sms_id_index ON public.mail_notification USING btree (sms_id) WHERE (sms_id IS NOT NULL);


--
-- Name: mail_shortcode_source_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_shortcode_source_index ON public.mail_shortcode USING gin (source public.gin_trgm_ops);


--
-- 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_template_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_template_model_index ON public.mail_template USING btree (model);


--
-- Name: mail_tracking_value_field_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mail_tracking_value_field_index ON public.mail_tracking_value USING btree (field);


--
-- 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 = 7835);


--
-- 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: mailing_contact_import_mailin_mailing_list_id_mailing_conta_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_contact_import_mailin_mailing_list_id_mailing_conta_idx ON public.mailing_contact_import_mailing_list_rel USING btree (mailing_list_id, mailing_contact_import_id);


--
-- Name: mailing_contact_mailing_conta_mailing_contact_id_mailing_co_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_contact_mailing_conta_mailing_contact_id_mailing_co_idx ON public.mailing_contact_mailing_contact_to_list_rel USING btree (mailing_contact_id, mailing_contact_to_list_id);


--
-- Name: mailing_contact_res_partner_c_res_partner_category_id_maili_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_contact_res_partner_c_res_partner_category_id_maili_idx ON public.mailing_contact_res_partner_category_rel USING btree (res_partner_category_id, mailing_contact_id);


--
-- Name: mailing_filter_create_uid_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_filter_create_uid_index ON public.mailing_filter USING btree (create_uid);


--
-- Name: mailing_list_mailing_list_mer_mailing_list_id_mailing_list__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_list_mailing_list_mer_mailing_list_id_mailing_list__idx ON public.mailing_list_mailing_list_merge_rel USING btree (mailing_list_id, mailing_list_merge_id);


--
-- Name: mailing_mailing_campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_mailing_campaign_id_index ON public.mailing_mailing USING btree (campaign_id);


--
-- Name: mailing_trace_campaign_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_trace_campaign_id_index ON public.mailing_trace USING btree (campaign_id) WHERE (campaign_id IS NOT NULL);


--
-- Name: mailing_trace_mail_mail_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_trace_mail_mail_id_index ON public.mailing_trace USING btree (mail_mail_id) WHERE (mail_mail_id IS NOT NULL);


--
-- Name: mailing_trace_mail_mail_id_int_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_trace_mail_mail_id_int_index ON public.mailing_trace USING btree (mail_mail_id_int) WHERE (mail_mail_id_int IS NOT NULL);


--
-- Name: mailing_trace_mass_mailing_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mailing_trace_mass_mailing_id_index ON public.mailing_trace USING btree (mass_mailing_id);


--
-- Name: mass_mailing_ir_attachments_r_attachment_id_mass_mailing_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX mass_mailing_ir_attachments_r_attachment_id_mass_mailing_id_idx ON public.mass_mailing_ir_attachments_rel USING btree (attachment_id, mass_mailing_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: note_stage_rel_stage_id_note_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX note_stage_rel_stage_id_note_id_idx ON public.note_stage_rel USING btree (stage_id, note_id);


--
-- Name: note_tags_rel_tag_id_note_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX note_tags_rel_tag_id_note_id_idx ON public.note_tags_rel USING btree (tag_id, note_id);


--
-- Name: payment_country_rel_country_id_payment_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_country_rel_country_id_payment_id_idx ON public.payment_country_rel USING btree (country_id, payment_id);


--
-- Name: payment_icon_payment_provider_payment_icon_id_payment_provi_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_icon_payment_provider_payment_icon_id_payment_provi_idx ON public.payment_icon_payment_provider_rel USING btree (payment_icon_id, payment_provider_id);


--
-- Name: payment_provider_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_provider_company_id_index ON public.payment_provider USING btree (company_id);


--
-- Name: payment_token_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_token_company_id_index ON public.payment_token USING btree (company_id);


--
-- Name: payment_transaction_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_transaction_company_id_index ON public.payment_transaction USING btree (company_id);


--
-- Name: payment_transaction_operation_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_transaction_operation_index ON public.payment_transaction USING btree (operation);


--
-- Name: payment_transaction_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX payment_transaction_state_index ON public.payment_transaction USING btree (state);


--
-- Name: picking_label_type_stock_pick_stock_picking_id_picking_labe_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX picking_label_type_stock_pick_stock_picking_id_picking_labe_idx ON public.picking_label_type_stock_picking_rel USING btree (stock_picking_id, picking_label_type_id);


--
-- Name: portal_share_res_partner_rel_res_partner_id_portal_share_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX portal_share_res_partner_rel_res_partner_id_portal_share_id_idx ON public.portal_share_res_partner_rel USING btree (res_partner_id, portal_share_id);


--
-- Name: portal_wizard_res_partner_rel_res_partner_id_portal_wizard__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX portal_wizard_res_partner_rel_res_partner_id_portal_wizard__idx ON public.portal_wizard_res_partner_rel USING btree (res_partner_id, portal_wizard_id);


--
-- Name: product_attr_exclusion_value__product_template_attribute_va_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attr_exclusion_value__product_template_attribute_va_idx ON public.product_attr_exclusion_value_ids_rel USING btree (product_template_attribute_value_id, product_template_attribute_exclusion_id);


--
-- Name: product_attribute_product_tem_product_template_id_product_a_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attribute_product_tem_product_template_id_product_a_idx ON public.product_attribute_product_template_rel USING btree (product_template_id, product_attribute_id);


--
-- Name: product_attribute_sequence_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attribute_sequence_index ON public.product_attribute USING btree (sequence);


--
-- Name: product_attribute_value_attribute_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attribute_value_attribute_id_index ON public.product_attribute_value USING btree (attribute_id);


--
-- Name: product_attribute_value_produ_product_template_attribute_li_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attribute_value_produ_product_template_attribute_li_idx ON public.product_attribute_value_product_template_attribute_line_rel USING btree (product_template_attribute_line_id, product_attribute_value_id);


--
-- Name: product_attribute_value_sequence_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_attribute_value_sequence_index ON public.product_attribute_value USING btree (sequence);


--
-- Name: product_category_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_category_name_index ON public.product_category USING gin (name public.gin_trgm_ops);


--
-- Name: product_category_parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_category_parent_id_index ON public.product_category USING btree (parent_id);


--
-- Name: product_category_parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_category_parent_path_index ON public.product_category USING btree (parent_path);


--
-- Name: product_label_layout_product__product_product_id_product_la_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_label_layout_product__product_product_id_product_la_idx ON public.product_label_layout_product_product_rel USING btree (product_product_id, product_label_layout_id);


--
-- Name: product_label_layout_product__product_template_id_product_l_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_label_layout_product__product_template_id_product_l_idx ON public.product_label_layout_product_template_rel USING btree (product_template_id, product_label_layout_id);


--
-- Name: product_label_layout_stock_mo_stock_move_line_id_product_la_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_label_layout_stock_mo_stock_move_line_id_product_la_idx ON public.product_label_layout_stock_move_line_rel USING btree (stock_move_line_id, product_label_layout_id);


--
-- Name: product_optional_rel_dest_id_src_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_optional_rel_dest_id_src_id_idx ON public.product_optional_rel USING btree (dest_id, src_id);


--
-- Name: product_packaging_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_packaging_company_id_index ON public.product_packaging USING btree (company_id);


--
-- Name: product_pricelist_item_compute_price_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_pricelist_item_compute_price_index ON public.product_pricelist_item USING btree (compute_price);


--
-- Name: product_pricelist_item_pricelist_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_pricelist_item_pricelist_id_index ON public.product_pricelist_item USING btree (pricelist_id);


--
-- Name: product_product_barcode_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_product_barcode_index ON public.product_product USING btree (barcode) WHERE (barcode IS NOT NULL);


--
-- Name: product_product_combination_indices_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_product_combination_indices_index ON public.product_product USING btree (combination_indices);


--
-- Name: product_product_combination_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX product_product_combination_unique ON public.product_product USING btree (product_tmpl_id, combination_indices) WHERE (active IS TRUE);


--
-- Name: product_product_default_code_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_product_default_code_index ON public.product_product USING btree (default_code);


--
-- Name: product_product_product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_product_product_tmpl_id_index ON public.product_product USING btree (product_tmpl_id);


--
-- Name: product_product_stock_track_c_product_product_id_stock_trac_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_product_stock_track_c_product_product_id_stock_trac_idx ON public.product_product_stock_track_confirmation_rel USING btree (product_product_id, stock_track_confirmation_id);


--
-- Name: product_replenish_stock_route_stock_route_id_product_replen_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_replenish_stock_route_stock_route_id_product_replen_idx ON public.product_replenish_stock_route_rel USING btree (stock_route_id, product_replenish_id);


--
-- Name: product_supplier_taxes_rel_tax_id_prod_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_supplier_taxes_rel_tax_id_prod_id_idx ON public.product_supplier_taxes_rel USING btree (tax_id, prod_id);


--
-- Name: product_supplierinfo_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_supplierinfo_company_id_index ON public.product_supplierinfo USING btree (company_id);


--
-- Name: product_supplierinfo_product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_supplierinfo_product_tmpl_id_index ON public.product_supplierinfo USING btree (product_tmpl_id);


--
-- Name: product_supplierinfo_stock_re_product_supplierinfo_id_stock_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_supplierinfo_stock_re_product_supplierinfo_id_stock_idx ON public.product_supplierinfo_stock_replenishment_info_rel USING btree (product_supplierinfo_id, stock_replenishment_info_id);


--
-- Name: product_tag_product_product_r_product_tag_id_product_produc_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_tag_product_product_r_product_tag_id_product_produc_idx ON public.product_tag_product_product_rel USING btree (product_tag_id, product_product_id);


--
-- Name: product_tag_product_template__product_tag_id_product_templa_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_tag_product_template__product_tag_id_product_templa_idx ON public.product_tag_product_template_rel USING btree (product_tag_id, product_template_id);


--
-- Name: product_taxes_rel_tax_id_prod_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_taxes_rel_tax_id_prod_id_idx ON public.product_taxes_rel USING btree (tax_id, prod_id);


--
-- Name: product_template_attribute_exclusion_product_template_attribute; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_exclusion_product_template_attribute ON public.product_template_attribute_exclusion USING btree (product_template_attribute_value_id);


--
-- Name: product_template_attribute_exclusion_product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_exclusion_product_tmpl_id_index ON public.product_template_attribute_exclusion USING btree (product_tmpl_id);


--
-- Name: product_template_attribute_line_attribute_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_line_attribute_id_index ON public.product_template_attribute_line USING btree (attribute_id);


--
-- Name: product_template_attribute_line_product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_line_product_tmpl_id_index ON public.product_template_attribute_line USING btree (product_tmpl_id);


--
-- Name: product_template_attribute_va_product_template_attribute_va_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_va_product_template_attribute_va_idx ON public.product_template_attribute_value_sale_order_line_rel USING btree (product_template_attribute_value_id, sale_order_line_id);


--
-- Name: product_template_attribute_value_attribute_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_value_attribute_id_index ON public.product_template_attribute_value USING btree (attribute_id);


--
-- Name: product_template_attribute_value_attribute_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_value_attribute_line_id_index ON public.product_template_attribute_value USING btree (attribute_line_id);


--
-- Name: product_template_attribute_value_product_attribute_value_id_ind; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_value_product_attribute_value_id_ind ON public.product_template_attribute_value USING btree (product_attribute_value_id);


--
-- Name: product_template_attribute_value_product_tmpl_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_attribute_value_product_tmpl_id_index ON public.product_template_attribute_value USING btree (product_tmpl_id);


--
-- Name: product_template_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_company_id_index ON public.product_template USING btree (company_id);


--
-- Name: product_template_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_template_name_index ON public.product_template USING gin (((jsonb_path_query_array(name, '$.*'::jsonpath))::text) public.gin_trgm_ops);


--
-- Name: product_variant_combination_product_template_attribute_valu_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX product_variant_combination_product_template_attribute_valu_idx ON public.product_variant_combination USING btree (product_template_attribute_value_id, product_product_id);


--
-- Name: project_favorite_user_rel_user_id_project_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_favorite_user_rel_user_id_project_id_idx ON public.project_favorite_user_rel USING btree (user_id, project_id);


--
-- Name: project_project_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_date_index ON public.project_project USING btree (date);


--
-- Name: project_project_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_name_index ON public.project_project USING gin (((jsonb_path_query_array(name, '$.*'::jsonpath))::text) public.gin_trgm_ops);


--
-- Name: project_project_project_tags__project_tags_id_project_proje_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_project_tags__project_tags_id_project_proje_idx ON public.project_project_project_tags_rel USING btree (project_tags_id, project_project_id);


--
-- Name: project_project_project_task__project_project_id_project_ta_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_project_task__project_project_id_project_ta_idx ON public.project_project_project_task_type_delete_wizard_rel USING btree (project_project_id, project_task_type_delete_wizard_id);


--
-- Name: project_project_sale_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_sale_line_id_index ON public.project_project USING btree (sale_line_id) WHERE (sale_line_id IS NOT NULL);


--
-- Name: project_project_stage_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_project_stage_id_index ON public.project_project USING btree (stage_id);


--
-- Name: project_share_wizard_res_part_res_partner_id_project_share__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_share_wizard_res_part_res_partner_id_project_share__idx ON public.project_share_wizard_res_partner_rel USING btree (res_partner_id, project_share_wizard_id);


--
-- Name: project_tags_project_task_rel_project_tags_id_project_task__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_tags_project_task_rel_project_tags_id_project_task__idx ON public.project_tags_project_task_rel USING btree (project_tags_id, project_task_id);


--
-- Name: project_task_ancestor_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_ancestor_id_index ON public.project_task USING btree (ancestor_id) WHERE (ancestor_id IS NOT NULL);


--
-- Name: project_task_date_deadline_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_date_deadline_index ON public.project_task USING btree (date_deadline);


--
-- Name: project_task_date_end_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_date_end_index ON public.project_task USING btree (date_end);


--
-- Name: project_task_date_last_stage_update_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_date_last_stage_update_index ON public.project_task USING btree (date_last_stage_update);


--
-- Name: project_task_display_project_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_display_project_id_index ON public.project_task USING btree (display_project_id);


--
-- Name: project_task_email_from_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_email_from_index ON public.project_task USING gin (email_from public.gin_trgm_ops);


--
-- Name: project_task_is_closed_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_is_closed_index ON public.project_task USING btree (is_closed);


--
-- Name: project_task_milestone_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_milestone_id_index ON public.project_task USING btree (milestone_id) WHERE (milestone_id IS NOT NULL);


--
-- Name: project_task_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_name_index ON public.project_task USING gin (name public.gin_trgm_ops);


--
-- Name: project_task_parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_parent_id_index ON public.project_task USING btree (parent_id);


--
-- Name: project_task_priority_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_priority_index ON public.project_task USING btree (priority);


--
-- Name: project_task_project_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_project_id_index ON public.project_task USING btree (project_id);


--
-- Name: project_task_sale_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_sale_line_id_index ON public.project_task USING btree (sale_line_id) WHERE (sale_line_id IS NOT NULL);


--
-- Name: project_task_stage_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_stage_id_index ON public.project_task USING btree (stage_id);


--
-- Name: project_task_type_project_tas_project_task_type_id_project__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_type_project_tas_project_task_type_id_project__idx ON public.project_task_type_project_task_type_delete_wizard_rel USING btree (project_task_type_id, project_task_type_delete_wizard_id);


--
-- Name: project_task_type_rel_project_id_type_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_type_rel_project_id_type_id_idx ON public.project_task_type_rel USING btree (project_id, type_id);


--
-- Name: project_task_type_user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_type_user_id_index ON public.project_task_type USING btree (user_id);


--
-- Name: project_task_user_rel_task_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_user_rel_task_id_index ON public.project_task_user_rel USING btree (task_id);


--
-- Name: project_task_user_rel_user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX project_task_user_rel_user_id_index ON public.project_task_user_rel USING btree (user_id);


--
-- Name: purchase_order_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_company_id_index ON public.purchase_order USING btree (company_id);


--
-- Name: purchase_order_date_approve_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_date_approve_index ON public.purchase_order USING btree (date_approve);


--
-- Name: purchase_order_date_order_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_date_order_index ON public.purchase_order USING btree (date_order);


--
-- Name: purchase_order_date_planned_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_date_planned_index ON public.purchase_order USING btree (date_planned);


--
-- Name: purchase_order_line_analytic_distribution_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_analytic_distribution_gin_index ON public.purchase_order_line USING gin (analytic_distribution);


--
-- Name: purchase_order_line_date_planned_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_date_planned_index ON public.purchase_order_line USING btree (date_planned);


--
-- Name: purchase_order_line_order_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_order_id_index ON public.purchase_order_line USING btree (order_id);


--
-- Name: purchase_order_line_orderpoint_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_orderpoint_id_index ON public.purchase_order_line USING btree (orderpoint_id) WHERE (orderpoint_id IS NOT NULL);


--
-- Name: purchase_order_line_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_product_id_index ON public.purchase_order_line USING btree (product_id) WHERE (product_id IS NOT NULL);


--
-- Name: purchase_order_line_sale_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_line_sale_line_id_index ON public.purchase_order_line USING btree (sale_line_id) WHERE (sale_line_id IS NOT NULL);


--
-- Name: purchase_order_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_name_index ON public.purchase_order USING gin (name public.gin_trgm_ops);


--
-- Name: purchase_order_priority_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_priority_index ON public.purchase_order USING btree (priority);


--
-- Name: purchase_order_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_state_index ON public.purchase_order USING btree (state);


--
-- Name: purchase_order_stock_picking__stock_picking_id_purchase_ord_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_stock_picking__stock_picking_id_purchase_ord_idx ON public.purchase_order_stock_picking_rel USING btree (stock_picking_id, purchase_order_id);


--
-- Name: purchase_order_user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX purchase_order_user_id_index ON public.purchase_order USING btree (user_id);


--
-- Name: rating_rating_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_message_id_index ON public.rating_rating USING btree (message_id);


--
-- Name: rating_rating_parent_res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_parent_res_id_index ON public.rating_rating USING btree (parent_res_id);


--
-- Name: rating_rating_parent_res_model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_parent_res_model_id_index ON public.rating_rating USING btree (parent_res_model_id);


--
-- Name: rating_rating_parent_res_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_parent_res_model_index ON public.rating_rating USING btree (parent_res_model);


--
-- Name: rating_rating_res_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_res_id_index ON public.rating_rating USING btree (res_id);


--
-- Name: rating_rating_res_model_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_res_model_id_index ON public.rating_rating USING btree (res_model_id);


--
-- Name: rating_rating_res_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rating_rating_res_model_index ON public.rating_rating USING btree (res_model);


--
-- Name: rel_badge_auth_users_res_users_id_gamification_badge_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rel_badge_auth_users_res_users_id_gamification_badge_id_idx ON public.rel_badge_auth_users USING btree (res_users_id, gamification_badge_id);


--
-- Name: rel_modules_langexport_module_id_wiz_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rel_modules_langexport_module_id_wiz_id_idx ON public.rel_modules_langexport USING btree (module_id, wiz_id);


--
-- Name: rel_server_actions_action_id_server_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rel_server_actions_action_id_server_id_idx ON public.rel_server_actions USING btree (action_id, server_id);


--
-- Name: res_bank_bic_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_bank_bic_index ON public.res_bank USING btree (bic);


--
-- Name: res_company_parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_company_parent_id_index ON public.res_company USING btree (parent_id);


--
-- Name: res_company_users_rel_user_id_cid_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_company_users_rel_user_id_cid_idx ON public.res_company_users_rel USING btree (user_id, cid);


--
-- Name: res_country_group_pricelist_r_res_country_group_id_pricelis_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_country_group_pricelist_r_res_country_group_id_pricelis_idx ON public.res_country_group_pricelist_rel USING btree (res_country_group_id, pricelist_id);


--
-- Name: res_country_res_country_group_res_country_group_id_res_coun_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_country_res_country_group_res_country_group_id_res_coun_idx ON public.res_country_res_country_group_rel USING btree (res_country_group_id, res_country_id);


--
-- Name: res_currency_rate_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_currency_rate_name_index ON public.res_currency_rate USING btree (name);


--
-- Name: res_groups_category_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_groups_category_id_index ON public.res_groups USING btree (category_id);


--
-- Name: res_groups_implied_rel_hid_gid_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_groups_implied_rel_hid_gid_idx ON public.res_groups_implied_rel USING btree (hid, gid);


--
-- Name: res_groups_report_rel_gid_uid_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_groups_report_rel_gid_uid_idx ON public.res_groups_report_rel USING btree (gid, uid);


--
-- Name: res_groups_spreadsheet_dashbo_res_groups_id_spreadsheet_das_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_groups_spreadsheet_dashbo_res_groups_id_spreadsheet_das_idx ON public.res_groups_spreadsheet_dashboard_rel USING btree (res_groups_id, spreadsheet_dashboard_id);


--
-- Name: res_groups_users_rel_uid_gid_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_groups_users_rel_uid_gid_idx ON public.res_groups_users_rel USING btree (uid, gid);


--
-- Name: res_lang_install_rel_lang_id_language_wizard_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_lang_install_rel_lang_id_language_wizard_id_idx ON public.res_lang_install_rel USING btree (lang_id, language_wizard_id);


--
-- Name: res_partner_bank_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_bank_partner_id_index ON public.res_partner_bank USING btree (partner_id);


--
-- Name: res_partner_category_parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_category_parent_id_index ON public.res_partner_category USING btree (parent_id);


--
-- Name: res_partner_category_parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_category_parent_path_index ON public.res_partner_category USING btree (parent_path);


--
-- Name: res_partner_commercial_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_commercial_partner_id_index ON public.res_partner USING btree (commercial_partner_id);


--
-- Name: res_partner_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_company_id_index ON public.res_partner USING btree (company_id);


--
-- Name: res_partner_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_date_index ON public.res_partner USING btree (date);


--
-- Name: res_partner_display_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_display_name_index ON public.res_partner USING btree (display_name);


--
-- Name: res_partner_is_published_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_is_published_index ON public.res_partner USING btree (is_published);


--
-- Name: res_partner_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_name_index ON public.res_partner USING btree (name);


--
-- Name: res_partner_parent_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_parent_id_index ON public.res_partner USING btree (parent_id);


--
-- Name: res_partner_ref_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_ref_index ON public.res_partner USING btree (ref);


--
-- Name: res_partner_res_partner_category_rel_partner_id_category_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_res_partner_category_rel_partner_id_category_id_idx ON public.res_partner_res_partner_category_rel USING btree (partner_id, category_id);


--
-- Name: res_partner_vat_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_vat_index ON public.res_partner USING btree (vat);


--
-- Name: res_partner_website_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_partner_website_id_index ON public.res_partner USING btree (website_id);


--
-- Name: res_users_apikeys_user_id_index_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_users_apikeys_user_id_index_idx ON public.res_users_apikeys USING btree (user_id, index);


--
-- Name: res_users_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_users_partner_id_index ON public.res_users USING btree (partner_id);


--
-- Name: res_users_settings_volumes_guest_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_users_settings_volumes_guest_id_index ON public.res_users_settings_volumes USING btree (guest_id);


--
-- Name: res_users_settings_volumes_guest_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX res_users_settings_volumes_guest_unique ON public.res_users_settings_volumes USING btree (user_setting_id, guest_id) WHERE (guest_id IS NOT NULL);


--
-- Name: res_users_settings_volumes_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_users_settings_volumes_partner_id_index ON public.res_users_settings_volumes USING btree (partner_id);


--
-- Name: res_users_settings_volumes_partner_unique; Type: INDEX; Schema: public; Owner: odoo
--

CREATE UNIQUE INDEX res_users_settings_volumes_partner_unique ON public.res_users_settings_volumes USING btree (user_setting_id, partner_id) WHERE (partner_id IS NOT NULL);


--
-- Name: res_users_settings_volumes_user_setting_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX res_users_settings_volumes_user_setting_id_index ON public.res_users_settings_volumes USING btree (user_setting_id);


--
-- Name: resource_calendar_attendance_dayofweek_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX resource_calendar_attendance_dayofweek_index ON public.resource_calendar_attendance USING btree (dayofweek);


--
-- Name: resource_calendar_attendance_hour_from_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX resource_calendar_attendance_hour_from_index ON public.resource_calendar_attendance USING btree (hour_from);


--
-- Name: resource_calendar_leaves_calendar_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX resource_calendar_leaves_calendar_id_index ON public.resource_calendar_leaves USING btree (calendar_id);


--
-- Name: resource_calendar_leaves_resource_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX resource_calendar_leaves_resource_id_index ON public.resource_calendar_leaves USING btree (resource_id);


--
-- Name: rule_group_rel_group_id_rule_group_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX rule_group_rel_group_id_rule_group_id_idx ON public.rule_group_rel USING btree (group_id, rule_group_id);


--
-- Name: sale_advance_payment_inv_sale_sale_order_id_sale_advance_pa_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_advance_payment_inv_sale_sale_order_id_sale_advance_pa_idx ON public.sale_advance_payment_inv_sale_order_rel USING btree (sale_order_id, sale_advance_payment_inv_id);


--
-- Name: sale_order_cancel_author_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_cancel_author_id_index ON public.sale_order_cancel USING btree (author_id);


--
-- Name: sale_order_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_company_id_index ON public.sale_order USING btree (company_id);


--
-- Name: sale_order_create_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_create_date_index ON public.sale_order USING btree (create_date);


--
-- Name: sale_order_date_order_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_date_order_id_idx ON public.sale_order USING btree (date_order DESC, id DESC);


--
-- Name: sale_order_line_analytic_distribution_gin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_analytic_distribution_gin_index ON public.sale_order_line USING gin (analytic_distribution);


--
-- Name: sale_order_line_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_company_id_index ON public.sale_order_line USING btree (company_id);


--
-- Name: sale_order_line_invoice_rel_order_line_id_invoice_line_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_invoice_rel_order_line_id_invoice_line_id_idx ON public.sale_order_line_invoice_rel USING btree (order_line_id, invoice_line_id);


--
-- Name: sale_order_line_order_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_order_id_index ON public.sale_order_line USING btree (order_id);


--
-- Name: sale_order_line_order_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_order_partner_id_index ON public.sale_order_line USING btree (order_partner_id);


--
-- Name: sale_order_line_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_product_id_index ON public.sale_order_line USING btree (product_id) WHERE (product_id IS NOT NULL);


--
-- Name: sale_order_line_project_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_project_id_index ON public.sale_order_line USING btree (project_id);


--
-- Name: sale_order_line_task_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_line_task_id_index ON public.sale_order_line USING btree (task_id);


--
-- Name: sale_order_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_name_index ON public.sale_order USING gin (name public.gin_trgm_ops);


--
-- Name: sale_order_option_order_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_option_order_id_index ON public.sale_order_option USING btree (order_id);


--
-- Name: sale_order_partner_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_partner_id_index ON public.sale_order USING btree (partner_id);


--
-- Name: sale_order_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_state_index ON public.sale_order USING btree (state);


--
-- Name: sale_order_tag_rel_tag_id_order_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_tag_rel_tag_id_order_id_idx ON public.sale_order_tag_rel USING btree (tag_id, order_id);


--
-- Name: sale_order_template_line_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_template_line_company_id_index ON public.sale_order_template_line USING btree (company_id);


--
-- Name: sale_order_template_line_sale_order_template_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_template_line_sale_order_template_id_index ON public.sale_order_template_line USING btree (sale_order_template_id);


--
-- Name: sale_order_template_option_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_template_option_company_id_index ON public.sale_order_template_option USING btree (company_id);


--
-- Name: sale_order_template_option_sale_order_template_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_template_option_sale_order_template_id_index ON public.sale_order_template_option USING btree (sale_order_template_id);


--
-- Name: sale_order_transaction_rel_sale_order_id_transaction_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_transaction_rel_sale_order_id_transaction_id_idx ON public.sale_order_transaction_rel USING btree (sale_order_id, transaction_id);


--
-- Name: sale_order_user_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sale_order_user_id_index ON public.sale_order USING btree (user_id);


--
-- Name: sms_sms_mail_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sms_sms_mail_message_id_index ON public.sms_sms USING btree (mail_message_id);


--
-- Name: sms_template_model_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sms_template_model_index ON public.sms_template USING btree (model);


--
-- Name: sms_template_sms_template_res_sms_template_id_sms_template__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX sms_template_sms_template_res_sms_template_id_sms_template__idx ON public.sms_template_sms_template_reset_rel USING btree (sms_template_id, sms_template_reset_id);


--
-- Name: snailmail_letter_attachment_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX snailmail_letter_attachment_id_index ON public.snailmail_letter USING btree (attachment_id) WHERE (attachment_id IS NOT NULL);


--
-- Name: snailmail_letter_message_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX snailmail_letter_message_id_index ON public.snailmail_letter USING btree (message_id) WHERE (message_id IS NOT NULL);


--
-- Name: stock_conflict_quant_rel_stock_quant_id_stock_inventory_con_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_conflict_quant_rel_stock_quant_id_stock_inventory_con_idx ON public.stock_conflict_quant_rel USING btree (stock_quant_id, stock_inventory_conflict_id);


--
-- Name: stock_inventory_adjustment_na_stock_quant_id_stock_inventor_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_inventory_adjustment_na_stock_quant_id_stock_inventor_idx ON public.stock_inventory_adjustment_name_stock_quant_rel USING btree (stock_quant_id, stock_inventory_adjustment_name_id);


--
-- Name: stock_inventory_conflict_stoc_stock_quant_id_stock_inventor_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_inventory_conflict_stoc_stock_quant_id_stock_inventor_idx ON public.stock_inventory_conflict_stock_quant_rel USING btree (stock_quant_id, stock_inventory_conflict_id);


--
-- Name: stock_inventory_warning_stock_stock_quant_id_stock_inventor_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_inventory_warning_stock_stock_quant_id_stock_inventor_idx ON public.stock_inventory_warning_stock_quant_rel USING btree (stock_quant_id, stock_inventory_warning_id);


--
-- Name: stock_location_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_location_company_id_index ON public.stock_location USING btree (company_id);


--
-- Name: stock_location_location_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_location_location_id_index ON public.stock_location USING btree (location_id);


--
-- Name: stock_location_parent_path_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_location_parent_path_index ON public.stock_location USING btree (parent_path);


--
-- Name: stock_location_usage_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_location_usage_index ON public.stock_location USING btree (usage);


--
-- Name: stock_lot_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_lot_company_id_index ON public.stock_lot USING btree (company_id);


--
-- Name: stock_lot_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_lot_name_index ON public.stock_lot USING gin (name public.gin_trgm_ops);


--
-- Name: stock_lot_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_lot_product_id_index ON public.stock_lot USING btree (product_id);


--
-- Name: stock_move_analytic_account_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_analytic_account_line_id_index ON public.stock_move USING btree (analytic_account_line_id) WHERE (analytic_account_line_id IS NOT NULL);


--
-- Name: stock_move_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_company_id_index ON public.stock_move USING btree (company_id);


--
-- Name: stock_move_created_purchase_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_created_purchase_line_id_index ON public.stock_move USING btree (created_purchase_line_id) WHERE (created_purchase_line_id IS NOT NULL);


--
-- Name: stock_move_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_date_index ON public.stock_move USING btree (date);


--
-- Name: stock_move_group_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_group_id_index ON public.stock_move USING btree (group_id);


--
-- Name: stock_move_line_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_company_id_index ON public.stock_move_line USING btree (company_id);


--
-- Name: stock_move_line_consume_rel_produce_line_id_consume_line_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_consume_rel_produce_line_id_consume_line_id_idx ON public.stock_move_line_consume_rel USING btree (produce_line_id, consume_line_id);


--
-- Name: stock_move_line_free_reservation_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_free_reservation_index ON public.stock_move_line USING btree (id, company_id, product_id, lot_id, location_id, owner_id, package_id) WHERE (((state IS NULL) OR ((state)::text <> ALL ((ARRAY['cancel'::character varying, 'done'::character varying])::text[]))) AND (reserved_qty > (0)::numeric));


--
-- Name: stock_move_line_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_move_id_index ON public.stock_move_line USING btree (move_id);


--
-- Name: stock_move_line_picking_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_picking_id_index ON public.stock_move_line USING btree (picking_id);


--
-- Name: stock_move_line_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_line_product_id_index ON public.stock_move_line USING btree (product_id);


--
-- Name: stock_move_location_dest_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_location_dest_id_index ON public.stock_move USING btree (location_dest_id);


--
-- Name: stock_move_location_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_location_id_index ON public.stock_move USING btree (location_id);


--
-- Name: stock_move_move_rel_move_dest_id_move_orig_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_move_rel_move_dest_id_move_orig_id_idx ON public.stock_move_move_rel USING btree (move_dest_id, move_orig_id);


--
-- Name: stock_move_orderpoint_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_orderpoint_id_index ON public.stock_move USING btree (orderpoint_id);


--
-- Name: stock_move_origin_returned_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_origin_returned_move_id_index ON public.stock_move USING btree (origin_returned_move_id);


--
-- Name: stock_move_picking_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_picking_id_index ON public.stock_move USING btree (picking_id);


--
-- Name: stock_move_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_product_id_index ON public.stock_move USING btree (product_id);


--
-- Name: stock_move_product_location_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_product_location_index ON public.stock_move USING btree (product_id, location_id, location_dest_id, company_id, state);


--
-- Name: stock_move_purchase_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_purchase_line_id_index ON public.stock_move USING btree (purchase_line_id) WHERE (purchase_line_id IS NOT NULL);


--
-- Name: stock_move_sale_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_sale_line_id_index ON public.stock_move USING btree (sale_line_id) WHERE (sale_line_id IS NOT NULL);


--
-- Name: stock_move_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_move_state_index ON public.stock_move USING btree (state);


--
-- Name: stock_orderpoint_snooze_stock_stock_warehouse_orderpoint_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_orderpoint_snooze_stock_stock_warehouse_orderpoint_id_idx ON public.stock_orderpoint_snooze_stock_warehouse_orderpoint_rel USING btree (stock_warehouse_orderpoint_id, stock_orderpoint_snooze_id);


--
-- Name: stock_package_level_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_package_level_company_id_index ON public.stock_package_level USING btree (company_id);


--
-- Name: stock_package_type_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_package_type_company_id_index ON public.stock_package_type USING btree (company_id);


--
-- Name: stock_package_type_stock_puta_stock_package_type_id_stock_p_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_package_type_stock_puta_stock_package_type_id_stock_p_idx ON public.stock_package_type_stock_putaway_rule_rel USING btree (stock_package_type_id, stock_putaway_rule_id);


--
-- Name: stock_picking_backorder_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_backorder_id_index ON public.stock_picking USING btree (backorder_id) WHERE (backorder_id IS NOT NULL);


--
-- Name: stock_picking_backorder_rel_stock_picking_id_stock_backorde_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_backorder_rel_stock_picking_id_stock_backorde_idx ON public.stock_picking_backorder_rel USING btree (stock_picking_id, stock_backorder_confirmation_id);


--
-- Name: stock_picking_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_company_id_index ON public.stock_picking USING btree (company_id);


--
-- Name: stock_picking_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_name_index ON public.stock_picking USING gin (name public.gin_trgm_ops);


--
-- Name: stock_picking_origin_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_origin_index ON public.stock_picking USING gin (origin public.gin_trgm_ops);


--
-- Name: stock_picking_picking_type_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_picking_type_id_index ON public.stock_picking USING btree (picking_type_id);


--
-- Name: stock_picking_sale_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_sale_id_index ON public.stock_picking USING btree (sale_id) WHERE (sale_id IS NOT NULL);


--
-- Name: stock_picking_scheduled_date_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_scheduled_date_index ON public.stock_picking USING btree (scheduled_date);


--
-- Name: stock_picking_sms_rel_stock_picking_id_confirm_stock_sms_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_sms_rel_stock_picking_id_confirm_stock_sms_id_idx ON public.stock_picking_sms_rel USING btree (stock_picking_id, confirm_stock_sms_id);


--
-- Name: stock_picking_state_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_state_index ON public.stock_picking USING btree (state);


--
-- Name: stock_picking_transfer_rel_stock_picking_id_stock_immediate_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_transfer_rel_stock_picking_id_stock_immediate_idx ON public.stock_picking_transfer_rel USING btree (stock_picking_id, stock_immediate_transfer_id);


--
-- Name: stock_picking_type_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_picking_type_company_id_index ON public.stock_picking_type USING btree (company_id);


--
-- Name: stock_putaway_rule_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_putaway_rule_company_id_index ON public.stock_putaway_rule USING btree (company_id);


--
-- Name: stock_putaway_rule_location_in_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_putaway_rule_location_in_id_index ON public.stock_putaway_rule USING btree (location_in_id);


--
-- Name: stock_quant_location_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_location_id_index ON public.stock_quant USING btree (location_id);


--
-- Name: stock_quant_lot_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_lot_id_index ON public.stock_quant USING btree (lot_id);


--
-- Name: stock_quant_package_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_package_company_id_index ON public.stock_quant_package USING btree (company_id);


--
-- Name: stock_quant_package_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_package_id_index ON public.stock_quant USING btree (package_id);


--
-- Name: stock_quant_package_location_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_package_location_id_index ON public.stock_quant_package USING btree (location_id);


--
-- Name: stock_quant_package_name_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_package_name_index ON public.stock_quant_package USING gin (name public.gin_trgm_ops);


--
-- Name: stock_quant_package_package_type_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_package_package_type_id_index ON public.stock_quant_package USING btree (package_type_id);


--
-- Name: stock_quant_product_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_product_id_index ON public.stock_quant USING btree (product_id);


--
-- Name: stock_quant_stock_request_cou_stock_quant_id_stock_request__idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_stock_request_cou_stock_quant_id_stock_request__idx ON public.stock_quant_stock_request_count_rel USING btree (stock_quant_id, stock_request_count_id);


--
-- Name: stock_quant_stock_track_confi_stock_quant_id_stock_track_co_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_quant_stock_track_confi_stock_quant_id_stock_track_co_idx ON public.stock_quant_stock_track_confirmation_rel USING btree (stock_quant_id, stock_track_confirmation_id);


--
-- Name: stock_route_categ_categ_id_route_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_categ_categ_id_route_id_idx ON public.stock_route_categ USING btree (categ_id, route_id);


--
-- Name: stock_route_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_company_id_index ON public.stock_route USING btree (company_id);


--
-- Name: stock_route_move_route_id_move_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_move_route_id_move_id_idx ON public.stock_route_move USING btree (route_id, move_id);


--
-- Name: stock_route_packaging_packaging_id_route_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_packaging_packaging_id_route_id_idx ON public.stock_route_packaging USING btree (packaging_id, route_id);


--
-- Name: stock_route_product_product_id_route_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_product_product_id_route_id_idx ON public.stock_route_product USING btree (product_id, route_id);


--
-- Name: stock_route_stock_rules_repor_stock_route_id_stock_rules_re_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_stock_rules_repor_stock_route_id_stock_rules_re_idx ON public.stock_route_stock_rules_report_rel USING btree (stock_route_id, stock_rules_report_id);


--
-- Name: stock_route_warehouse_warehouse_id_route_id_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_route_warehouse_warehouse_id_route_id_idx ON public.stock_route_warehouse USING btree (warehouse_id, route_id);


--
-- Name: stock_rule_action_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rule_action_index ON public.stock_rule USING btree (action);


--
-- Name: stock_rule_location_dest_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rule_location_dest_id_index ON public.stock_rule USING btree (location_dest_id);


--
-- Name: stock_rule_location_src_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rule_location_src_id_index ON public.stock_rule USING btree (location_src_id);


--
-- Name: stock_rule_route_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rule_route_id_index ON public.stock_rule USING btree (route_id);


--
-- Name: stock_rule_warehouse_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rule_warehouse_id_index ON public.stock_rule USING btree (warehouse_id);


--
-- Name: stock_rules_report_stock_ware_stock_warehouse_id_stock_rule_idx; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_rules_report_stock_ware_stock_warehouse_id_stock_rule_idx ON public.stock_rules_report_stock_warehouse_rel USING btree (stock_warehouse_id, stock_rules_report_id);


--
-- Name: stock_storage_category_capacity_storage_category_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_storage_category_capacity_storage_category_id_index ON public.stock_storage_category_capacity USING btree (storage_category_id);


--
-- Name: stock_valuation_company_product_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_company_product_index ON public.stock_valuation_layer USING btree (product_id, company_id, id, value, quantity);


--
-- Name: stock_valuation_layer_account_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_layer_account_move_id_index ON public.stock_valuation_layer USING btree (account_move_id) WHERE (account_move_id IS NOT NULL);


--
-- Name: stock_valuation_layer_account_move_line_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_layer_account_move_line_id_index ON public.stock_valuation_layer USING btree (account_move_line_id) WHERE (account_move_line_id IS NOT NULL);


--
-- Name: stock_valuation_layer_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_layer_index ON public.stock_valuation_layer USING btree (product_id, remaining_qty, stock_move_id, company_id, create_date);


--
-- Name: stock_valuation_layer_stock_move_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_layer_stock_move_id_index ON public.stock_valuation_layer USING btree (stock_move_id);


--
-- Name: stock_valuation_layer_stock_valuation_layer_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_valuation_layer_stock_valuation_layer_id_index ON public.stock_valuation_layer USING btree (stock_valuation_layer_id);


--
-- Name: stock_warehouse_orderpoint_company_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_warehouse_orderpoint_company_id_index ON public.stock_warehouse_orderpoint USING btree (company_id);


--
-- Name: stock_warehouse_orderpoint_location_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_warehouse_orderpoint_location_id_index ON public.stock_warehouse_orderpoint USING btree (location_id);


--
-- Name: stock_warehouse_orderpoint_warehouse_id_index; Type: INDEX; Schema: public; Owner: odoo
--

CREATE INDEX stock_warehouse_orderpoint_warehouse_id_index ON public.stock_warehouse_orderpoint USING btree (warehouse_id);


--
