11 lines
512 B
MySQL
11 lines
512 B
MySQL
|
|
-- Rückschau / Nachbereitung: explizit abschließbar (Dashboard & Filter)
|
||
|
|
ALTER TABLE training_units
|
||
|
|
ADD COLUMN IF NOT EXISTS debrief_completed_at TIMESTAMPTZ NULL;
|
||
|
|
|
||
|
|
COMMENT ON COLUMN training_units.debrief_completed_at IS
|
||
|
|
'Zeitpunkt, zu dem die Trainer-Rückschau (Nachbereitung) bewusst abgeschlossen wurde; NULL = offen';
|
||
|
|
|
||
|
|
CREATE INDEX IF NOT EXISTS idx_training_units_debrief_open
|
||
|
|
ON training_units (status, debrief_completed_at)
|
||
|
|
WHERE status = 'completed' AND debrief_completed_at IS NULL;
|