我正在尝试使用liqubase创建一个空数据库。我使用this方法来实现,但问题是它对我不起作用。
我使用的是Postgresql 10,并且这是我的maven和liqubase配置:
我使用的是Postgresql 10,并且这是我的maven和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>
以及我的 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
mvn clean package
出现的错误是:
org.postgresql.util.PSQLException: 致命错误:数据库“auth”不存在