steven-tey / precedent

An opinionated collection of components, hooks, and utilities for your Next.js project.
https://precedent.dev
MIT License
4.78k stars 420 forks source link

Remove shadowDatabaseUrl from Prisma now That Vercel Improved Migrations Handling #69

Open MarioGiancini opened 1 year ago

MarioGiancini commented 1 year ago

Overview

When doing a second migration with prisma, you are presented with Error: P3005:

Error: P3005

The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline

Removing the shadowDatabaseUrl from the schema.prisma datasource fixes this.

With latest updates from Vercel, we no longer need the shadowDatabaseUrl to handle migrations.

See: https://github.com/prisma/prisma/issues/19234#issuecomment-1693746150