The docs on this are fairly sparse, and I plan to update them based on whether I/we can figure this out. I couldn’t find anything on configuring the deployment scripts etc, but if I missed something, please let me know.
Onto the issue -
The setup for Prisma Data Proxy is to change your DATABASE_URL
environment variable from your postgress://
or mysql://
etc. to the generated prisma://
URL.
If you do this, and try to deploy, you’ll get the following message:
The solution is to swap that environment variable for that command, see this small Prisma doc
But I can’t find the block of code that’s running the Prisma migrate command - I can only see that it’s running the following: yarn prisma migrate deploy --schema /vercel/path0/api/db/schema.prisma
. I haven’t looked at the source code yet, so it’s possible that this isn’t yet configurable - please let me know if this is the case and I can work on a patch. Basically, in order to use this feature, that command needs to be modified in the way described by the Prisma docs linked to previously.
Is there a recommended way to do this?
Thanks!