Liquidbase Issue after upgrade

After upgrading jmix, upgrade script is generated every time for all fileref attributes (updating database doenot have any effect).

This is sample liquidbase script -

<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-4.11.xsd"
        objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">
    <changeSet id="1" author="SheelCompliance">
        <dropColumn columnName="FILE_" tableName="COM_NOTICE"/>
    </changeSet>
    <changeSet id="2" author="SheelCompliance">
        <addColumn tableName="COM_NOTICE">
            <column name="FILE_" type="VARCHAR(1024)"/>
        </addColumn>
    </changeSet>
    <changeSet id="3" author="SheelCompliance">
        <dropColumn columnName="FILE_" tableName="COM_PERMIT_FILE"/>
    </changeSet>
    <changeSet id="4" author="SheelCompliance">
        <addColumn tableName="COM_PERMIT_FILE">
            <column name="FILE_" type="VARCHAR(1024)"/>
        </addColumn>
    </changeSet>
</databaseChangeLog>

This is happening in all applications. Please advice.

Hi!
Which version of Jmix Studio do you use?
We’ve just fixed the same problem, you can see the fix in Jmix Studio version 1.3.6

upgraded to 1.3.6, still getting same issue

Hi, could you provide a test project, I have this problem is not reproducible.
In the latest release version, just this problem was fixed.

Test project is attached
test.zip (82.4 KB)

the Liquibase script name are like this-
Screenshot 2022-09-14 214449

the script contnet is -

<?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-4.11.xsd"
        objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">
    <changeSet id="1" author="test">
        <dropColumn columnName="FILE_" tableName="NEW_ENTITY"/>
    </changeSet>
    <changeSet id="2" author="test">
        <addColumn tableName="NEW_ENTITY">
            <column name="FILE_" type="VARCHAR(1024)"/>
        </addColumn>
    </changeSet>
</databaseChangeLog>

The upgrade has also created issues with the Quartz Add-On - all tables of quartz were removed by liquibase after the upgrade and then not recreated it seems. I have not had time to explore this so simply removed the add-on for now, but will need it to work soon.

Another issue is also after 1.3.6 JMIX Studio is installed the fileref field updates keep repeating on every build (assume they are not updated)

I don’t reproduce your problem even on your project. :frowning:
Perhaps after upgrading to the latest version, there was some kind of conflict in dependencies, so I suggest doing the following:

  1. Delete the cache in the root folder .gradle.
  2. Install a later version of Jmix (for example 1.2.2.), and then upgrade to the latest.

It seems that there really was a problem, but it was not reproduced for everyone and not on all databases. We have a ticket, everything will be fine in the next fix release.

This is happening to me too: Changelog created each time for FileRef field
Jmix 1.3.3
Jmix Studio 1.3.7-213
SQL Server

This bug is a major setback for me and harmful to production data is deployed (i.e. file ref fields will effectively be cleared)

What can I do ?

We are working on it: https://youtrack.jmix.io/issue/JST-3256
The fix (the final one) will be available in the next patch, most probably next week.
Meanwhile you should be able to add the invalid changelogs to Ignore list and they won’t appear again.

Sorry for this recurring problem.

1 Like

Thank you Konstantin !