我们使用 Maven 3.0.4 和 Liquibase 2.0.5 Maven 插件。我们有这个设置来清除我们的测试数据库中的所有表:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<executions>
<!-- To guarantee our test db is pure, drop all tables, before re-creating
the test db. -->
<execution>
<id>drop-tables-before-running-liquibase</id>
<phase>compile</phase>
<configuration>
<propertyFile>${liquibase.properties.path}</propertyFile>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>
<goals>
<goal>dropAll</goal>
</goals>
</execution>
</executions>
</plugin>
但是,在执行上述操作后,脚本会随着
[错误] 无法在项目数据库上执行目标 org.liquibase:liquibase-maven-plugin:2.0.5:dropAll (drop-tables-before-running-liquibase):设置或运行 Liquibase 时出错:com.mysql.jdbc。 exceptions.jdbc4.MySQLSyntaxErrorException: 表 'test_db2.test_annotation' 不存在 -> [帮助 1]
这是一个奇怪的错误,因为当我登录到有问题的数据库时,表就在那里。关于如何解决这个问题或更深入地解决它的任何建议?