Error during db creation due to Liquibase changelogs tables/columns names in lowercase/uppercase

Hi,

we’re using Jmix plugin 1.1.0-212 on AWS RDS with MySQL 8.0.25 engine.
We run Jmix on an empty RDS instance (no database schema is present) and, during the creation of database, it fails.

The problem is that the database we’re using is case sensitive but in Jmix Liquibase changelogs, tables/columns names are written sometimes in uppercase and sometimes in lowercase. So if a table has been created by Jmix in upper case and then Jmix tries to alter it using lowercase name, Jmix will throw a “table not found” exception.

Unfortunately it’s not possible to change the case sensitive option on this RDS db instance.

Could you please fix Jmix so that tables/columns names will be written in Liquibase changelogs always in the same way? (or always in uppercase or always in lowercase)

Thanks,
Alfio

Hi,

what Jmix framework version do you use?

Could you please share the application log with the liquibase error, so we could detect the incorrect changeset?

Or the error happens not in changesets that go with Jmix framework but in changesets generated by Studio for your tables? If so, then could you provide examples in which cases Studio generate incorrect changesets.

I just had the same experience - tried migrating to AWS RDS MySQL 8 and some changelogs generated by studio have lower case table names, while most of them use UPPER case. The MySQL setting cannot be changed on the fly, so you have to recreate a new database.

I don’t remember what version of studio I had at the time these changelogs were generated. It was from December 2022 if that helps. I looked through a few change logs and it was always the drop column / drop foreign key actions that used lower case. But I did not check all files.

Here is a subset of one such changelog where the table name SCHOOL is sometimes “school”.

    <changeSet id="3" author="membership">
        <createIndex indexName="IDX_SCHOOL_PHYSICAL_ADDRESS" tableName="SCHOOL">
            <column name="PHYSICAL_ADDRESS_ID"/>
        </createIndex>

        <addForeignKeyConstraint baseColumnNames="PHYSICAL_ADDRESS_ID" baseTableName="SCHOOL"
                                 constraintName="FK_SCHOOL_ON_PHYSICAL_ADDRESS" referencedColumnNames="ID"
                                 referencedTableName="ADDRESS"/>
    </changeSet>
    <changeSet id="4" author="membership">
        <dropForeignKeyConstraint baseTableName="school" constraintName="FK_SCHOOL_ON_ADDRESS"/>
    </changeSet>
    <changeSet id="5" author="membership">
        <dropColumn columnName="ADDRESS_ID" tableName="school"/>
    </changeSet>

Hi, Jeff

Thanks for reporting the issue.
I do confirm such problem in Studio. The YouTrack issue created, so you can follow the progress.