小编bor*_*ino的帖子

Liquibase 格式的 SQL 更改日志和多个文件

我们开始在 spring-boot 上为我们的应用程序使用 liquibase。要求之一对 liquibase 使用纯 sql。我们有很多用于初始化数据库的 sql 文件。我检查文档https://www.liquibase.org/documentation/sql_format.html但没有找到信息如何创建更改日志 sql 文件的层次结构。liquibase.change-log等待单个文件的Spring 引导属性。我试图通过,;所有时间从 spring-boot 中得到错误来分隔文件名找不到更改日志位置... 所以我的问题:
我如何声明以“sql 格式”执行另一个或多个文件?
像 xml 等价物:
<include file="second_changelog.sql"/>
<include file="third_changelog.sql"/>


不工作的例子first_changelog.sql
--liquibase formatted sql --changeset author_1:1 UPDATE [dbo].[customers] SET name='HD_1' WHERE id = '11'; --import file=second_changelog.sql --import file=third_changelog.sql

附注。请不要建议 xml,因为我只需要 SQL

java spring liquibase spring-boot

1
推荐指数
2
解决办法
1万
查看次数

标签 统计

java ×1

liquibase ×1

spring ×1

spring-boot ×1