Kairo-Jinkendo/backend/migrations/025_work_cycle.sql
Lars d1bc725ab5
Some checks failed
Deploy Development / deploy (push) Failing after 48s
Test Suite / pytest-backend (push) Failing after 1s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
AP2.0f: work_cycle Zeitbox und actions.work_cycle_id.
RoadmapItem type work_cycle, Sprint-API, agile_iteration Next-Action-Strategie; Steering-Snapshot zeigt active_work_cycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 12:34:36 +02:00

12 lines
528 B
SQL

-- AP2.0f — work_cycle (Zeitbox/Sprint) + actions.work_cycle_id
ALTER TABLE roadmap_items DROP CONSTRAINT IF EXISTS roadmap_items_item_type_check;
ALTER TABLE roadmap_items ADD CONSTRAINT roadmap_items_item_type_check
CHECK (item_type IN ('milestone', 'review_gate', 'maturity_stage', 'work_cycle'));
ALTER TABLE actions
ADD COLUMN work_cycle_id UUID NULL REFERENCES roadmap_items(id) ON DELETE SET NULL;
CREATE INDEX idx_actions_work_cycle ON actions(tenant_id, work_cycle_id)
WHERE work_cycle_id IS NOT NULL;