kundenkarte/sql/llx_kundenkarte_equipment.sql
data 06f8bc8fde Version 3.5.0 - Drag & Drop Sortierung, Duplicate-Key-Fix
- Drag & Drop Sortierung im Anlagenbaum (Geschwister-Ebene)
- UNIQUE KEY uk_kundenkarte_societe_system um fk_contact erweitert
- Automatische DB-Migration beim Modul-Aktivieren
- Visueller Abstand zwischen Root-Elementen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:05:13 +01:00

36 lines
1.4 KiB
SQL
Executable file

-- ============================================================================
-- Copyright (C) 2026 Alles Watt lauft
--
-- Table for equipment instances (Sicherungsautomaten, FI-Schalter, etc.)
-- Equipment is placed on a carrier (Hutschiene) at a specific position
-- ============================================================================
CREATE TABLE llx_kundenkarte_equipment
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
fk_carrier integer NOT NULL COMMENT 'Traeger/Hutschiene',
fk_equipment_type integer NOT NULL COMMENT 'Equipment-Typ',
label varchar(255) COMMENT 'Optionale Beschriftung/Stromkreis',
-- Positionierung auf dem Traeger
position_te integer NOT NULL COMMENT 'Startposition in TE (0-basiert)',
width_te integer NOT NULL COMMENT 'Breite in TE (vom Typ oder ueberschrieben)',
-- Flexible Felder (JSON)
field_values text,
-- Optionale Produkt-Verknuepfung (ueberschreibt Typ-Produkt)
fk_product integer DEFAULT NULL COMMENT 'Spezifisches Dolibarr-Produkt',
note_private text,
status tinyint DEFAULT 1 NOT NULL,
date_creation datetime,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key varchar(14)
) ENGINE=innodb;