加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

liquibase – 如何生成changlogFile in.sql格式?

发布时间:2020-12-12 06:37:12 所属栏目:MsSql教程 来源:网络整理
导读:我确实运行此查询以生成.sql格式的changelogFile liquibase --driver=com.mysql.jdbc.Driver --classpath=mysql-connector-java-5.1.24-bin.jar --changeLogFile=test_diff.sql --url="jdbc:mysql://localhost/provision" --username=root --password=** diff
我确实运行此查询以生成.sql格式的changelogFile
liquibase --driver=com.mysql.jdbc.Driver 
          --classpath=mysql-connector-java-5.1.24-bin.jar 
          --changeLogFile=test_diff.sql 
          --url="jdbc:mysql://localhost/provision"
          --username=root 
          --password=** 
           diffChangeLog 
          --referenceUrl=jdbc:mysql://localhost/provision_old 
          --referenceUsername=root 
          --referencePassword=***

我得到以下错误

Liquibase Update Failed: No serializer associated with the filename or extension 'sql'
SEVERE 5/2/13 12:50 PM:liquibase: No serializer associated with the filename or extension 'sql'
java.lang.RuntimeException: No serializer associated with the filename or extension 'sql'

是否可以在.sql格式中生成changelogfile?

解决方法

From the manual:

diffChangeLog Writes Change Log XML to update the base database to the target database to standard out

(强调我的)

所以–changeLogFile指定XML输出的名称,而不是SQL输出.

您必须首先创建XML.之后,您可以通过例如生成SQL脚本使用updateSQL命令将其应用于空数据库.然后Liquibase将从中创建一个SQL脚本.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读