Setting up Drizzle with 2 DB sources
Hi all.
I'm trying to setup a 2 source DB with NextJS and Drizzle.
Is it possible to tell drizzle which index setup file to read based on my env variables?
I have a Docker Container I want to use for local development and another setup when deploying to Vercel Previews.
Basically I want to make the app deployable either with Docker locally or to Vercel ( using their DB connection and Storage ).
Cheers for any info!
2 Replies
Figured it out 😉
Can you explain how you did this? Trying to use local and hosted Postgres in dev and production respectively, but can't get the migrations to work on production since the db's out of sync.