gpt4 book ai didi

Liquibase 带有相对于脚本文件的文件

转载 作者:行者123 更新时间:2023-12-04 11:51:33 32 4
gpt4 key购买 nike

在 liquibase 中,我可以包含相对于当前脚本文件的路径的文件:

<include file="initialise/data.xml" relativeToChangelogFile="true"/>

在更改集中,我还可以指向一个包含要插入的数据的文件,例如像这样:
<changeSet author="system-init" id="load-Company">
<loadData tableName="Company" file="liquibase/initialise/Company.csv">

但是,这次我需要使用相对于我运行 liquibase 命令的当前目录的路径。是否可以在这里以某种方式使用脚本相对路径?

最佳答案

最新版本的 Liquibase 解决了这个问题。也可以看看:
https://www.liquibase.org/2014/11/liquibase-3-3-0-released.html

Improvements

[CORE-549] – relativeToChangelogFile for loadData, loadUpdateData, sqlFile



请注意将您的 XML 架构位置更新到 3.3 版本:
<xsi:schemaLocation="
http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd
">

关于Liquibase <loadData> 带有相对于脚本文件的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25976053/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com