Problem
After deploying to Vercel, the database tables don't exist because prisma db push was never run against the production database. This causes "Access Denied" on sign-in with error:
The table `public.users` does not exist in the current database.
Fix
Add prisma db push to the build script in package.json so it runs automatically on every Vercel deployment. prisma db push is idempotent — it only applies changes if the schema differs from the database, so it's safe to run on every build.
Change:
To:
"build": "prisma db push && next build"
This ensures the database schema is always in sync with the Prisma schema before the app builds.
Problem
After deploying to Vercel, the database tables don't exist because
prisma db pushwas never run against the production database. This causes "Access Denied" on sign-in with error:Fix
Add
prisma db pushto thebuildscript inpackage.jsonso it runs automatically on every Vercel deployment.prisma db pushis idempotent — it only applies changes if the schema differs from the database, so it's safe to run on every build.Change:
To:
This ensures the database schema is always in sync with the Prisma schema before the app builds.