Skip to content

Automate prisma db push during build for deployment #13

Description

@rowan-stein

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:

"build": "next build"

To:

"build": "prisma db push && next build"

This ensures the database schema is always in sync with the Prisma schema before the app builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions