Explicitly Specify database name with liquibase-neo4j

Hi,
We have Configuration - Neo4j Plugin for Liquibase this configured and works with default database. But now we want to try some blue/green kind of deployment where we will have 2 neo4j instance running and let the liquibase driver switch den deploy to a different instance.
Looking at the config I thought we would just have to specify it with other configuration values

                <configuration>
                    <changeLogFile>${changeLogFile}</changeLogFile>
                    <url>jdbc:neo4j:neo4j+s://${targetdbhost}:${targetdbport}</url>
                    <username>${username}</username>
                    <password>${password}</password>
                    <database>${databasename}</database>
                    <searchPath>build/changelog/ddl,build/changelog/dml</searchPath>
                </configuration>

but that did not work. It gives a warning

[INFO] ---------------< org.test.liquibase:neo4j-orchard.build >---------------
[INFO] Building neo4j-orchard.build 0.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] Parameter 'database' is unknown for plugin 'liquibase-maven-plugin:4.29.1:update (run-migrations)'

How do i explicitly Specify database name that it should deploy to?

maybe explicitly specifying the database name will help?
p.s. I can't check, just a guess

<url>jdbc:neo4j:neo4j+s://${targetdbhost}:${targetdbport}?database=${nameDB}</url>

1 Like

That's indeed the way to go.
You can use the database setting as a query parameter in the jdbc connection string.
The database value can then come from a maven property.

This works. Thank you.

1 Like