我在springBoot中使用liquiBase 3.8.0。我的changelog文件树是这样的。
changelog-master.xml
--changelog-test.xml
----changelog-1.0.0
----changelog-1.1.0
--changelog-prod.xml
----changelog-1.0.0
----changelog-1.1.0
我试着使用contexts,我发现了奇怪的行为--如果我在changelog-master.xml或changelog-test.xml中使用context,就像这样(父changelog文件)。
<include file="test/changelog-test.xml" relativeToChangelogFile="true" context="!prod"/>
那么liquibase就不会在changelog表中填写contexts列,contexts列为空。
但如果我把属性'context'添加到'changeSet'中
<changeSet id="changelog_in_test_section" author="[email protected]" logicalFilePath="changelog-1.0.0" context="test">
之后,contexts一栏填入'!prod AND test'
我希望contexts列总是被填满(如果我在父changelog中使用context属性)。
我会把这个添加到github问题列表中。 或者更好的是,如果你有代码修复,可以把它添加到pull request中。https:/github.comliquibaseliquibaseissues)。