问题描述
我正在使用Liquibase 4.0.0版在PostgreSQL中部署数据库迁移脚本。
我使用主变更日志文件,它看起来像下面的文件。
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
<includeAll path="4.460.7" relativeToChangelogFile="true"/>
</databaseChangeLog>
我的项目结构如下所示。
我使用docker
容器在Jenkinsfile中运行liquibase update
,如下所示。
docker run --rm -v /home/jenkins/workspace/mate_DB_Migration_Scripts_master:/liquibase/changelog liquibase/liquibase --url="jdbc:postgresql://host:5432/postgres?currentSchema=schema1" --changeLogFile=../liquibase/changelog/changelog.xml --username=postgres --password=some_password update
docker run --rm -v /home/jenkins/workspace/mate_DB_Migration_Scripts_master:/liquibase/changelog liquibase/liquibase --url="jdbc:postgresql://host:5432/postgres?currentSchema=schema2" --changeLogFile=../liquibase/changelog/changelog.xml --username=postgres --password=some_password update
它运行update
就好了。问题是,对于相同的databasechangelog
,我可以在changeset
文件中看到2行,如下所示。
有人知道为什么会这样吗?如果您需要其他任何信息来解决此问题,请告诉我。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)