I'm trying to create an empty database using liqubase. I use this approach to do this, but the problem is it doesn't work for me.
I use Postgresql 10 and there are my configurations for maven and liqubase:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<propertyFile>src/main/resources/liquibase/liquibase.properties</propertyFile>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
And my liqubase.properties
:
changeLogFile=src/main/resources/liquibase/db.changelog.xml
driver=org.postgresql.Driver
dropFirst=false
url=jdbc:postgresql://localhost:5432/auth?createDatabaseIfNotExist=true
username=postgres
password=root
The error on mvn clean package
is:
org.postgresql.util.PSQLException: FATAL: database "auth" does not exist