How can i store multiple datasource in same liquibase.properties

How can i store multiple datasource in same liquibase.properties

url=jdbc:oracle:thin:@1.2.3.4:1621/some_name.com
classpath=/path
username=user
password=pass
liquibase.hub.mode=off

how can add another url to the same properties file ?

Hi @addy3494
There can only be one url in the properties file.
Another option is to create a new one for each connection that you need.
dev.liquibase.properties
test.liquibase.properties
or
conn1.liquibase.properties
conn2.liquibase.properties
etc.
And then on the command line provide a --defaultsFile=test.liquibase.properties parameter.
Another option is to add it as a commandline variable.
liquibase --url=jdbc:oracle:thin:@1.2.3.4:1621/some_name.com
A third option is to use Liquibase Pro and add it as an environment variable.
set liquibase.command.url=jdbc:oracle:thin:@1.2.3.4:1621/some_name.com

1 Like

Can I pass —defaultsFile twice ? For each property

Hi @addy3494
Let’s take a step back and maybe give more context on what you are trying to accomplish.
Can you describe the use case you are trying to do?

1 Like