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

ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_fk_supplier (fk_supplier);
ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_fk_user (fk_user);
ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_action (action_type);
ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_status (status);
ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_token (callback_token);
ALTER TABLE llx_idsconnect_log ADD INDEX idx_idsconnect_log_date (date_creation);

ALTER TABLE llx_idsconnect_log ADD CONSTRAINT fk_idsconnect_log_supplier FOREIGN KEY (fk_supplier) REFERENCES llx_idsconnect_supplier(rowid);
ALTER TABLE llx_idsconnect_log ADD CONSTRAINT fk_idsconnect_log_user FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);
