-- ============================================================================
-- Copyright (C) 2026 Alles Watt lauft
-- ============================================================================

ALTER TABLE llx_kundenkarte_equipment_carrier ADD INDEX idx_kundenkarte_carrier_anlage (fk_anlage);
ALTER TABLE llx_kundenkarte_equipment_carrier ADD INDEX idx_kundenkarte_carrier_status (status);

ALTER TABLE llx_kundenkarte_equipment_carrier ADD CONSTRAINT fk_kundenkarte_carrier_anlage FOREIGN KEY (fk_anlage) REFERENCES llx_kundenkarte_anlage (rowid) ON DELETE CASCADE;
