fix(chapter-30): convert user IDs to UUID foreign keys

↗ view on GitHub · Amal · 2026-05-24 · 5b82eff9

Chapter: 30 - Database identity integrity.

Plain-English map:
Convert nine `user_id` columns from text to UUID and attach them to Supabase
Auth users with foreign keys.

Why it matters:
Supabase user IDs are UUIDs. Storing them as plain text allows invalid values
and orphaned rows that the database cannot protect against.

Principle:
Let the database enforce identity shape and relationships.

Precedent borrowed:
Upstream PR #113.

Upstream base: willchen96/mike@d39f580.
Original local commit: 5c28df3.
Repository amal66/mike
Author Amal <mamalanand3@gmail.com>
Authored
Parents b7ef398b
Stats 1 file changed , +152
Part of Supabase migrations and database integrity

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-5b82eff9.md from inside the repo you want the change in.

⬇ Download capture-commit-5b82eff9.md