Handling sqlite locally and d1 production db?
How do I handle these two environments?
3 Replies
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into
#ask-ai
for a quick spin!I assume you are able to run D1 as expected for your production by following this guide:
https://www.prisma.io/docs/guides/cloudflare-d1
However, for developing locally you would like to use Sqlite instead of D1, right?
You can use multiple env files and configure them to use sqlite in development and D1 in production:
https://www.prisma.io/docs/orm/more/development-environment/environment-variables#using-multiple-env-files
Managing Prisma ORM environment variables and settings | Prisma Doc...
Learn how to manage the environment variables and settings in your Prisma ORM project