我的软件:
Maven 3.0.4
Liquibase:3.0.2
Postgresql:9.1.9
JavaSE:1.7.0_25
我的问题:
我用 liquibase 创建了一些模式
<changeSet id="create-customermgmt-schema" author="nl">
<sql>CREATE SCHEMA "customermgmt";</sql>
</changeSet>
如果我尝试执行 liquibase:dropAll 我得到这个:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building akufit.server 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- liquibase-maven-plugin:3.0.2:dropAll (default-cli) @ akufit.server ---
[INFO] ------------------------------------------------------------------------
[INFO] Executing on Database: jdbc:postgresql://localhost:5432/akufit
INFO 8/18/13 5:45 PM:liquibase: Successfully acquired change log lock
INFO 8/18/13 5:45 PM:liquibase: Dropping Database Objects in schema: akufit.public
INFO 8/18/13 5:45 PM:liquibase: Creating database history table with name: public.databasechangelog
INFO 8/18/13 5:45 PM:liquibase: Successfully released change log lock
INFO 8/18/13 5:45 PM:liquibase: Successfully released change log lock
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.978s
[INFO] Finished at: Sun Aug 18 17:45:54 CEST 2013
[INFO] Final Memory: 8M/85M
[INFO] ------------------------------------------------------------------------`
但我的架构仍然存在,并且没有任何内容被丢弃。
我验证了所有表和模式都属于 liquibase 设置中的用户。如果您需要更多信息,请写信。
也许你可以帮助我。谢谢。
pom.xml:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<changeLogFile>src/main/resources/db-changelog.xml</changeLogFile>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/akufit</url>
<username>***</username>
<password>***</password>
</configuration>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.0-801.jdbc4</version>
</dependency>
</dependencies>
</plugin>