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; `;