Files
saltbo__agent-kanban/migrations/0020_board_labels.sql
jarvis a2fa54a729 feat!: rebuild Agent Kanban for Realmroot Toolbox
Replace the v1 Agent/Machine runtime and CLI architecture with the v2 Resource Server, AMA-backed projections, task lifecycle, session observation, BDD specifications, and a single-package layered codebase.

BREAKING CHANGE: remove the v1 CLI, internal Agent/Machine runtime entities, workspace layout, and legacy runtime coordination APIs.
2026-09-02 00:17:52 -04:00

20 lines
498 B
SQL

ALTER TABLE boards ADD COLUMN labels TEXT NOT NULL DEFAULT '[]';
UPDATE boards
SET labels = COALESCE(
(
SELECT json_group_array(json_object('name', label, 'color', '#71717A', 'description', ''))
FROM (
SELECT DISTINCT json_each.value AS label
FROM tasks, json_each(tasks.labels)
WHERE tasks.board_id = boards.id
AND json_each.value IS NOT NULL
AND json_each.value != ''
ORDER BY label
)
),
'[]'
);
ALTER TABLE tasks DROP COLUMN priority;