CREATE UNIQUE INDEX IF NOT EXISTS ux_odoo_workcenter_map_instance_workcenter
ON mv_edge_oee_ucepsa_demo.odoo_workcenter_map (
    odoo_instance,
    odoo_workcenter_id
);

CREATE UNIQUE INDEX IF NOT EXISTS ux_odoo_workcenter_map_tenant_site_instance_workcenter
ON mv_edge_oee_ucepsa_demo.odoo_workcenter_map (
    tenant,
    site,
    odoo_instance,
    odoo_workcenter_id
);

CREATE UNIQUE INDEX IF NOT EXISTS ux_odoo_workorders_demo_instance_workorder
ON mv_edge_oee_ucepsa_demo.odoo_workorders_demo (
    odoo_instance,
    odoo_workorder_id
);

CREATE UNIQUE INDEX IF NOT EXISTS ux_odoo_workorders_demo_tenant_site_instance_workorder
ON mv_edge_oee_ucepsa_demo.odoo_workorders_demo (
    tenant,
    site,
    odoo_instance,
    odoo_workorder_id
);
