Configuring a staging and production database in prisma.schema on Netlify

Howdy. I’m on netlify and want to be able to have a separate DB for Production and one for Staging (What Netlify would call deploy-preview or branch deploy) in struggle town at the moment.

I have tried to use this plugin that seems to run successfully, but the changes don’t seem to be applied to the prisma.schema and instead the default is used.

I have seen this plugin by @rob and was thinking about using that as a base to attempt another plugin for dealing with this problem.

But before iI go down that road, has anyone else had/solved this issue?


1 Like

Updating this in case anyone else is interested.

Netlify has just added the ability to Manage scopes and contextual values for environment variables through the Netlify UI

Did a quick test and this seems to have solved the problem.

A great new feature from netlfy and makes the process from going from local to staging to prod sweet as.

1 Like