我们开始在Spring Boot应用程序中使用Liquibase。其中一个要求是使用纯SQL进行Liquibase。我们有许多用于初始化数据库的SQL文件。我检查了文档https://www.liquibase.org/documentation/sql_format.html,但没有找到如何创建变更日志SQL文件层次结构的信息。Spring Boot属性
如何声明执行另一个或多个“sql格式”的文件?
类似于xml等价物:
liquibase.change-log
需要单个文件。我尝试通过,
或;
分隔文件名,每次都从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
PS. 请不要建议使用 XML,因为我只需要 SQL。