blob: 5ed14d72ccb6db69398cdbf47f9b0f3d260f4ca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-- Linear task chains: a fixed, ordered sequence of native tasks with a WIP
-- limit of exactly 1 -- only the task at the current position is ever
-- unlocked/actionable. Completing it unlocks the next position; completing
-- the last position marks the chain completed instead.
CREATE TABLE task_chains (
id TEXT PRIMARY KEY,
project_id TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'active',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE native_tasks ADD COLUMN chain_id TEXT DEFAULT '';
ALTER TABLE native_tasks ADD COLUMN chain_position INTEGER DEFAULT 0;
ALTER TABLE native_tasks ADD COLUMN chain_unlocked BOOLEAN DEFAULT 0;
CREATE INDEX IF NOT EXISTS idx_native_tasks_chain ON native_tasks(chain_id);
|