Files
nuzlocke-tracker/.beans/nuzlocke-tracker-bnhh--user-model-run-ownership-and-visibility-migration.md
Julian Tabel c9d42b091f
All checks were successful
CI / backend-tests (push) Successful in 26s
CI / frontend-tests (push) Successful in 29s
Daedalus and Talos integration test
2026-03-20 16:31:19 +01:00

1.0 KiB

title, status, type, priority, created_at, updated_at, parent, blocked_by
title status type priority created_at updated_at parent blocked_by
User model, run ownership, and visibility migration todo task normal 2026-03-20T15:28:18Z 2026-03-20T15:28:34Z nuzlocke-tracker-d98o
nuzlocke-tracker-2561

Create a User model synced from Supabase Auth. Add owner_id FK to runs table. Add visibility column (public/private) to runs with default public. Existing runs will have NULL owner_id (unowned).

Checklist

  • Create User model (id matches Supabase user UUID, email, display_name, created_at)
  • Alembic migration: create users table
  • Alembic migration: add owner_id (nullable FK to users) and visibility (enum: public/private, default public) to runs table
  • Update Run model with owner relationship and visibility field
  • Create user sync endpoint or webhook (on first login, upsert user record from Supabase JWT claims)
  • Update RunResponse schema to include owner and visibility
  • Add visibility enforcement: private runs return 403 unless requester is owner