db-migrate / node-db-migrate

Database migration framework for node
Other
2.32k stars 360 forks source link

Is there any way to override DATABASE_URL so I can determine which db to run migration for? #738

Open cc3613 opened 3 years ago

cc3613 commented 3 years ago

I'm submitting a...

Current behavior

My app recently got a new db created to have specific migrations run on it. But because of DATABASE_URL, I cannot set database.json or .db-migraterc to set multiple db to use db-migrate -e <env_name>

db-migrate ignores database.json and .db-migraterc when DATABASE_URL is present in env variables. I cannot take that value out as other scripts still depend on it.

How do I run different migrations on different dbs?

Expected behavior

Being able to run different migrations on different dbs

Environment


db-migrate version: 0.11

Additional information:
- Node version: 10  
- Platform: Linux