- 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>
45 lines
2 KiB
SQL
Executable file
45 lines
2 KiB
SQL
Executable file
-- ============================================================================
|
|
-- Copyright (C) 2026 Alles Watt lauft
|
|
--
|
|
-- Anlage Connections (Verbindungen zwischen Anlagen-Elementen im Baum)
|
|
-- Beschreibt Kabel/Leitungen zwischen Strukturelementen wie HAK → Zählerschrank
|
|
-- ============================================================================
|
|
|
|
CREATE TABLE IF NOT EXISTS llx_kundenkarte_anlage_connection
|
|
(
|
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
|
entity integer DEFAULT 1 NOT NULL,
|
|
|
|
-- Source and target anlagen
|
|
fk_source integer NOT NULL COMMENT 'Source Anlage ID',
|
|
fk_target integer NOT NULL COMMENT 'Target Anlage ID',
|
|
|
|
-- Connection description
|
|
label varchar(255) COMMENT 'Connection label/description',
|
|
|
|
-- Medium/Cable info (references medium_type table or free text)
|
|
fk_medium_type integer COMMENT 'Reference to medium_type table',
|
|
medium_type_text varchar(100) COMMENT 'Free text if no type selected',
|
|
medium_spec varchar(100) COMMENT 'Specification (e.g., 5x16)',
|
|
medium_length varchar(50) COMMENT 'Length (e.g., 15m)',
|
|
medium_color varchar(50) COMMENT 'Wire/cable color',
|
|
|
|
-- Additional info
|
|
route_description text COMMENT 'Description of cable route',
|
|
installation_date date COMMENT 'When was this installed',
|
|
|
|
-- Status
|
|
status integer DEFAULT 1,
|
|
note_private text,
|
|
note_public text,
|
|
|
|
date_creation datetime,
|
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
fk_user_creat integer,
|
|
fk_user_modif integer,
|
|
|
|
INDEX idx_anlage_conn_source (fk_source),
|
|
INDEX idx_anlage_conn_target (fk_target),
|
|
CONSTRAINT fk_anlage_conn_source FOREIGN KEY (fk_source) REFERENCES llx_kundenkarte_anlage(rowid) ON DELETE CASCADE,
|
|
CONSTRAINT fk_anlage_conn_target FOREIGN KEY (fk_target) REFERENCES llx_kundenkarte_anlage(rowid) ON DELETE CASCADE
|
|
) ENGINE=innodb;
|