Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadUpdateData does not work well with relativeToChangelogFile when going from 3.10.2 to 4.4.3 #2123

Closed
DiogoParrinha opened this issue Sep 28, 2021 · 3 comments

Comments

@DiogoParrinha
Copy link

DiogoParrinha commented Sep 28, 2021

Our file structure is:

  • master.xml (executed by liquibase cli)
    -- project/
    --- subchangelog.xml (included by master.xml)
    --- items/
    ---- data.csv

master.xml includes the subchangelog.xml

<include file="project/subchangelog.xml" relativeToChangelogFile="true"/>

Example changeset in subchangelog.xml:

    <changeSet id="test_changeset_id" author="test_author" runOnChange="true">
        <preConditions>
            <tableExists tableName="TEST_TABLE"/>
        </preConditions>
        <loadUpdateData tableName="TEST_TABLE"
                        primaryKey="MESSAGE_ID"
                        file="items/data.csv" relativeToChangelogFile="true">
            <column name="MESSAGE_ID"/>
            <column name="LANGUAGE_ID"/>
        </loadUpdateData>
    </changeSet>

This would work fine in 3.10.2 but when using 4.4.3 it doesn't (we've had to add to the classpath property by the way, to ensure we could run absolute paths in the CLI). In 4.4.3 it says that it cannot find items/data.csv. We also updated the XSD schemaLocation to 4.4. I only got it to work when removing relativeToChangelogFile="true" and using a file path starting from the current working directory.

I've seen that in 4.4.3 there were some fixes related to SQL files and relativeToChangelogFile property, I'm not sure whether there is still some issue lying around in the loadUpdateData.

Additional note: we have logicalFilePath set in our changelogs.

Thank you

@molivasdat
Copy link
Contributor

Hi @DiogoParrinha Thanks for writing up this issue. We have changed quite a bit to fix file path issues between how 3.x works and 4.x works. We will add this to the list of issues that we are processing.

@DiogoParrinha
Copy link
Author

Thank you!

@nvoxland
Copy link
Contributor

nvoxland commented Jan 6, 2022

This should be fixed with #2073

@nvoxland nvoxland closed this as completed Jan 6, 2022
Conditioning++ automation moved this from To Do to Done Jan 6, 2022
@nvoxland nvoxland added this to the v4.7.0 milestone Jan 6, 2022
@nvoxland nvoxland removed this from Done in Conditioning++ Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants