How to manage databases depending on the environment?

177 Views Asked by At

Here, i have different databases for different environments

application-local.properties: databasename: mylocaldb

application-dev.properties: databasename: mydevdb

application-qa.properties: databasename: myqadb

application-prod.properties: databasename: myproddb

and in migration scripts, in V1_users.sql, i have

CREATE TABLE **databasename**.usertable(--relevant code--);

So, How do i assign this database name depending on the environment active i.e local/dev/qa/prod

0

There are 0 best solutions below