kundenkarte/sql/llx_kundenkarte_equipment_panel.sql
data 71272fa425 fix(schematic): Terminal-Farbpropagierung, Auto-Naming, PWA-Abgänge
- 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>
2026-03-17 09:57:58 +01:00

28 lines
1.2 KiB
SQL
Executable file

-- ============================================================================
-- Copyright (C) 2026 Alles Watt lauft
--
-- Equipment Panel table (Schaltschrankfelder)
-- Represents physical sections/fields in a distribution board
-- ============================================================================
CREATE TABLE llx_kundenkarte_equipment_panel (
rowid INTEGER AUTO_INCREMENT PRIMARY KEY,
entity INTEGER DEFAULT 1 NOT NULL,
fk_anlage INTEGER NOT NULL, -- Zählerschrank/UV that contains this panel
label VARCHAR(128), -- "Feld 1", "Linkes Feld", etc.
position INTEGER DEFAULT 0, -- Order (left to right)
note_private TEXT,
status SMALLINT DEFAULT 1, -- 1=active, 0=inactive
date_creation DATETIME,
tms TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat INTEGER,
fk_user_modif INTEGER,
import_key VARCHAR(14),
INDEX idx_panel_anlage (fk_anlage),
CONSTRAINT fk_panel_anlage FOREIGN KEY (fk_anlage)
REFERENCES llx_kundenkarte_anlage(rowid) ON DELETE CASCADE
) ENGINE=InnoDB;