This commit is contained in:
Ian Gulliver
2026-10-18 21:24:41 -07:00
parent 7728484e86
commit 57788cc711
59 changed files with 465 additions and 512 deletions
@@ -0,0 +1,5 @@
ALTER TABLE tasks ADD COLUMN port_base INTEGER NOT NULL DEFAULT 0;
UPDATE tasks SET port_base = (
SELECT 41000 + 10 * (count(*) - 1) FROM tasks AS earlier
WHERE earlier.status = 'active' AND (earlier.created_at < tasks.created_at OR (earlier.created_at = tasks.created_at AND earlier.id <= tasks.id))
) WHERE status = 'active' AND port_base = 0;