- buildTerminalPhaseMap: Schritt 1b - Leitungen mit expliziter Farbe als Startpunkte (nur Gerät→Gerät, keine Abgänge) - buildTerminalPhaseMap: Block-Durchreichung (Top↔Bottom) entfernt - buildTerminalPhaseMap: Junction-Verbindungen (Terminal→Leitung) bidirektional verarbeitet via _connectionById Index - PWA: Abgangs-Rendering mit Index-Fallback wenn source_terminal_id fehlt - PWA: Abgangs-Labels max-height 130px, min-height 30px - Auto-Naming: EquipmentCarrier create/update → 'R' + count - Auto-Naming: EquipmentPanel update → 'Feld ' + count - pwa_api.php: Hardcoded Fallbacks 'Feld'/'Hutschiene' entfernt - pwa.js: Hutschiene Auto-Naming dynamisch aus Panel-Carrier-Anzahl - kundenkarte.js: Carrier-Dialog Placeholder 'z.B. R1 (automatisch)' - SW Cache auf v12.5 hochgezählt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.8 KiB
SQL
Executable file
43 lines
1.8 KiB
SQL
Executable file
-- ============================================================================
|
|
-- Copyright (C) 2026 Alles Watt lauft
|
|
--
|
|
-- Audit Log table for tracking changes to all KundenKarte objects
|
|
-- ============================================================================
|
|
|
|
CREATE TABLE IF NOT EXISTS llx_kundenkarte_audit_log
|
|
(
|
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
|
entity integer DEFAULT 1 NOT NULL,
|
|
|
|
-- Object identification
|
|
object_type varchar(64) NOT NULL COMMENT 'Type: equipment, carrier, panel, anlage, connection',
|
|
object_id integer NOT NULL COMMENT 'ID of the object',
|
|
object_ref varchar(128) COMMENT 'Reference/label of the object (for history)',
|
|
|
|
-- Related context
|
|
fk_societe integer COMMENT 'Customer/Third party',
|
|
fk_anlage integer COMMENT 'Installation/Anlage',
|
|
|
|
-- Action tracking
|
|
action varchar(32) NOT NULL COMMENT 'create, update, delete, move, duplicate',
|
|
field_changed varchar(64) COMMENT 'Specific field that was changed',
|
|
old_value text COMMENT 'Previous value (JSON for complex data)',
|
|
new_value text COMMENT 'New value (JSON for complex data)',
|
|
|
|
-- User and timestamp
|
|
fk_user integer NOT NULL COMMENT 'User who made the change',
|
|
user_login varchar(64) COMMENT 'Login name (cached for history)',
|
|
date_action datetime NOT NULL,
|
|
|
|
-- Optional notes
|
|
note text COMMENT 'Additional context',
|
|
|
|
-- IP tracking (optional, for security)
|
|
ip_address varchar(45) COMMENT 'IP address of the user',
|
|
|
|
INDEX idx_audit_object (object_type, object_id),
|
|
INDEX idx_audit_societe (fk_societe),
|
|
INDEX idx_audit_anlage (fk_anlage),
|
|
INDEX idx_audit_date (date_action),
|
|
INDEX idx_audit_user (fk_user)
|
|
) ENGINE=innodb;
|