我有一个 spring/hibernate/mysql 应用程序,我使用 liquibase maven 插件(Intellij Idea)生成数据库。这是我的 liquibase.properties 配置:
url jdbc:mysql://localhost:3306/dbName
username username
password pass
changeLogFile src/main/scripts/changeLog.xml
referenceUrl hibernate:hibernate.cfg.xml
diffChangeLogFile src/main/scripts/diffChangeLog.xml
driver com.mysql.jdbc.Driver
如您所见,这直接与数据库一起工作,并在 liquibase-update 上更改它。
问题: 是否有任何选项可以更改我的配置以生成 oracle DB 的 sql 输出?所以,不是直接使用数据库,而是创建输出脚本。
最佳答案
Liquibase 使用两个独立的操作来直接更新和生成 SQL。
使用mvn liquibase:update
更新数据库
使用mvn liquibase:updateSQL
生成SQL
如果目标绑定(bind)到生命周期,则需要更改它。
关于java - 如何配置liquibase maven插件为oracle生成sql输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24528222/