mysql - 用于在 yaml 中生成脚本的 Liquibase 命令
问题描述
当我尝试在 yaml 中生成 liquibase 脚本时,我得到了这个错误:
liquibase.exception.LiquibaseException:liquibase.command.CommandExecutionException:java.lang.RuntimeException:没有序列化程序与 liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:282) 的文件名或扩展名“changelogs/.struct.yaml”相关联) ~[liquibase.jar:na] 在 liquibase.integration.commandline.Main.doMigration(Main.java:1060) [liquibase.jar:na] 在 liquibase.integration.commandline.Main.run(Main.java:209) [liquibase.jar:na] 在 liquibase.integration.commandline.Main.main(Main.java:132) [liquibase.jar:na]
这是我使用的命令:
liquibase --driver=com.mysql.jdbc.Driver
--changeLogFile=changelogs/.struct.yaml
--classpath=libs/mysql-connector-java-8.0.11.jar
--url="jdbc:mysql://127.0.0.1:32306/test?user=root&password=somepassword&useUnicode=true&characterEncoding=utf8"
--username=root
--password=somepassword
generateChangeLog
我也添加了snakeyaml-1.25.jar。我正在使用 mysql 在 mac 上运行。我使用 brew install 安装了 liquibase。
解决方案
您的文件名以点开头:
--changeLogFile=changelogs/.struct.yaml
将其更改为类似db.struct.yaml
或struct.yaml
推荐阅读
- python-3.x - 将 IntVar() 值转换为 Int
- azure - 无法从 Azure REST API 获取指标
- arrays - 删除后 UI 重新呈现并获取所有复选框
- node.js - 这个异步转换的承诺是否正确,为什么不需要等待?
- jenkins-pipeline - 仅当分支与 Jenkinsfile 管道中的主节点匹配时如何询问用户输入?
- python - 在 QWebEngineView 中获取 sslerrors 信号
- javascript - 使用 JavaScript 方向 API,需要在步行和公交中混合方向指令
- html - CSS将图像与文本对齐
- javascript - 在两个分隔符上拆分字符串?
- javascript - 如何将我的菜单更改为切换菜单?