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
Nate Vukovich
Nate VukovichOP•11mo ago
Figured it out 😉
Budi
Budi•4mo ago
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.

Did you find this page helpful?