how to seperate dev vs prod db
Hi everyone I have a local dev db and a production db on railway however when ever I use my local dev db I need switch the env variable in my prisma schema to dev instead of prod. How do I have the prod version but continue to work with dev on my local machine
4 Replies
I think this is what you need to look into
Prisma
Using multiple .env files.
Learn how to setup a dedicated testing environment using multiple .env files.
Or this
Also shouldn't you use local .env for development
And you put your production variables on the host (example setting your environment db url on vercel to be the production one)
Or any other service you use for hosting should have environment secrets/variables