0
我正在使用LiquiBase在远程mysql数据库上执行差异化,并发现生成的变更集对表名称(全部为小写)使用了不正确的外壳。这随后导致更新失败。Liquibase diff在表名上使用错误的大小写生成变更集
- Liquibase v1.9.5
- 数据库:MySQL的
- 当地操作系统:Windows 7
- 远程操作系统:Ubuntu的
我做得不对,或者这是一个错误?
这里是我的diff任务:
<target name="diff-database" depends="prepare">
<echo message="Diff ${database.url} to base ${production.database.url}" />
<diffDatabaseToChangeLog driver="${database.driver}"
url="${production.database.url}"
username="${production.database.username}"
password="${production.database.password}"
baseUrl="${database.url}"
baseUsername="${database.username}"
basePassword="${database.password}"
outputFile="${changeLogFile}" classpathref="liquibase-path">
</diffDatabaseToChangeLog>
</target>
这产生(在其他项):
<changeSet author="Marty (generated)" id="1264010991558-2">
<addColumn tableName="project">
<column name="earliestUpdatedRevision" type="BIGINT"/>
</addColumn>
</changeSet>
运行针对该变更的更新会导致如下:
liquibase.exception.MigrationFailedException: Migration failed for change set changelogs/mysql/complete/root.changelog.xml::1264010991558-2::Marty (generated):
Reason: liquibase.exception.JDBCException: Error executing SQL ALTER TABLE `project` ADD `earliestUpdatedRevision` BIGINT:
Caused By: Error executing SQL ALTER TABLE `project` ADD `earliestUpdatedRevision` BIGINT:
Caused By: Table 'xxx.project' doesn't exist
实际表名是“Project”。如果我修改changeEntry以使用正确的外壳,它就可以工作。
关于如何正确工作的任何建议?
问候
马蒂