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

ALTER TABLE llx_kundenkarte_equipment_type ADD UNIQUE INDEX uk_kundenkarte_equipment_type_ref (ref, entity);

ALTER TABLE llx_kundenkarte_equipment_type ADD INDEX idx_kundenkarte_equipment_type_fk_system (fk_system);
ALTER TABLE llx_kundenkarte_equipment_type ADD INDEX idx_kundenkarte_equipment_type_active (active);

ALTER TABLE llx_kundenkarte_equipment_type ADD CONSTRAINT fk_kundenkarte_equipment_type_fk_system FOREIGN KEY (fk_system) REFERENCES llx_c_kundenkarte_anlage_system (rowid);
