Journal
Personal
23 Sep 2026#adr#db#postgres#web 1 min read

Dropping Supabase, keeping Postgres

The Next.js rewrite of the parts inventory moves to plain Postgres, Drizzle and Better Auth.

FromBobinarca: PCB Component Inventory

The first plan for the rewrite migrated the live Supabase database in place. Reviewing that plan ended it. New uuid ids would have broken the Flutter app in daily use, a self-hoster could never build the schema from an empty database, and the migration SQL had a recursive row-level security policy and a path from admin to owner.

The new plan: Next.js with plain PostgreSQL 17, Drizzle migrations and Better Auth for accounts, workspaces and invitations. Self-hosting shrinks from about ten containers to two, the app and Postgres. The 203 existing parts arrive through a re-runnable import; the old project is never touched.

Takeaway

Reviewing a migration plan costs an afternoon; running a bad one costs the live app.

Related