Prisma migrate does not work with Vercel Postgres #2515
Replies: 5 comments 8 replies
-
After some research I found this page in Neon's docs explaining that you need to create a separate database for |
Beta Was this translation helpful? Give feedback.
-
Also having this problem as well! Have my schema.prisma set up exactly like the docs and all the enccessary env vars from vercel. Any solution found? I have a hobby account so I can't make another db. |
Beta Was this translation helpful? Give feedback.
-
Seems to be a bug with the Beta setup, or at least a lack of forethought into a standard Prisma postgres setup by the Vercel team. Would be nice if the standard spin up of a storage bucket on vercel would allow for a normal database URL and a shadow database URL. I upgraded to a Pro plan then reset my credentials hoping it would then provide me with a shadow database URL under the same storage bucket, but it didn't. Don't want to have a messy account with a separate full set of credentials just for the shadow database URL. Based on this thread, we can reset the database, but this sounds like it defeats the purpose of the shadow implementation and non-ideal. Has anyone found a better work around than this? If not, do we have an open bug report to see if we can get this reconciled by vercel? |
Beta Was this translation helpful? Give feedback.
-
👋 Vercel Postgres/ Neon recently announced that the need to create the shadow database manually was removed: Improving the developer experience for Prisma users. I would recommend removing the datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_DATABASE_URL")
- shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
} Let us know if it works once you make the update. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Just a general update on Vercel's end: We've rectified our documentation and scrubbed all mentions of |
Beta Was this translation helpful? Give feedback.
-
Has anyone had success using the Vercel Postgres default configuration?
For me, it works well, but when I use
prisma migrate dev
, I experience problems. With a new database, I can only create the initial migration. After that, I get the following error:I've tried different things and creating a separate database for the
shadowDatabaseUrl
fields seems to work.Beta Was this translation helpful? Give feedback.
All reactions