feat: add hierarchical subitems to checklist templates and executions

This commit is contained in:
Matthias Hochmeister
2026-03-28 18:37:36 +01:00
parent 51be3b54f6
commit 893fbe43a0
5 changed files with 209 additions and 94 deletions

View File

@@ -0,0 +1,11 @@
-- Add parent_item_id to vorlage items (self-referential)
ALTER TABLE checklist_vorlage_items
ADD COLUMN parent_item_id INT REFERENCES checklist_vorlage_items(id) ON DELETE CASCADE;
CREATE INDEX idx_vorlage_items_parent ON checklist_vorlage_items(parent_item_id);
-- Add parent_ausfuehrung_item_id to execution items (self-referential)
ALTER TABLE checklist_ausfuehrung_items
ADD COLUMN parent_ausfuehrung_item_id INT REFERENCES checklist_ausfuehrung_items(id) ON DELETE CASCADE;
CREATE INDEX idx_ausfuehrung_items_parent ON checklist_ausfuehrung_items(parent_ausfuehrung_item_id);