1.0 KiB
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 |
|
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