-- Vorlagen: Phasen/Parallel-Streams wie im Einheiten-Editor (planLoc-Abbild)
ALTER TABLE training_plan_template_sections
    ADD COLUMN IF NOT EXISTS phase_kind VARCHAR(20) NOT NULL DEFAULT 'whole_group',
    ADD COLUMN IF NOT EXISTS phase_order_index INT NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS parallel_stream_order_index INT NULL;

COMMENT ON COLUMN training_plan_template_sections.parallel_stream_order_index IS
    'NULL = Ganzgruppen-Abschnitt; 0..n = Stream innerhalb paralleler Phase';
