-- Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
--
-- Indizes für llx_idsconnect_supplier
--

ALTER TABLE llx_idsconnect_supplier ADD UNIQUE INDEX uk_idsconnect_supplier_ref (ref, entity);
ALTER TABLE llx_idsconnect_supplier ADD INDEX idx_idsconnect_supplier_fk_soc (fk_soc);
ALTER TABLE llx_idsconnect_supplier ADD INDEX idx_idsconnect_supplier_active (active);

ALTER TABLE llx_idsconnect_supplier ADD CONSTRAINT fk_idsconnect_supplier_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
ALTER TABLE llx_idsconnect_supplier ADD CONSTRAINT fk_idsconnect_supplier_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
