Use this when you need a clean local database state.
Canonical command
npm run db:reset:local
What it does
- Resets the local Supabase database (
npx supabase db reset --local). - Ensures the local
prismaDB user exists (node scripts/create-prisma-user.js). - Resets Prisma migrations (
prisma migrate reset). - Seeds data (
npm run db:seed).
Prereqs
- Supabase running locally:
npx supabase start. .envincludes:DATABASE_URL(Prisma connection string)PRISMA_DB_PASSWORD(used byscripts/create-prisma-user.js)
Notes
- Integration tests may also require
POSTGRES_DB_URLso the test harness can create extensions.