From 43f2d5b12299e537a44509c83f9a4a9b3beb5624 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:24:28 +0000 Subject: [PATCH] feat: add nullable owner_id columns to lists and tasks Co-Authored-By: Claude Fable 5 --- server/utils/schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/utils/schema.ts b/server/utils/schema.ts index aef413f..7e8f50f 100644 --- a/server/utils/schema.ts +++ b/server/utils/schema.ts @@ -20,4 +20,8 @@ create table if not exists tasks ( create index if not exists idx_tasks_list_id on tasks(list_id); create index if not exists idx_tasks_unconsumed on tasks(consumed) where consumed = false; + +-- Multi-user plumbing: rows are owned by a Zitadel sub. NULL = legacy/unowned (pre-multi-user). +alter table lists add column if not exists owner_id text; +alter table tasks add column if not exists owner_id text; `;