Studio keeps generating new index due to long index name length

I have a @OneToMany between some classes with longer names.

The index on the owning according to the java @Index annotation is called
“IDX_AGNICIO_TACTICAL_PLAN_ENTRY_MAINTENANCE_WINDOW_TACTICAL_PLAN_ENTRY”

this name is 70 characters long. The index in the database is cut off to 63 characters “idx_agnicio_tactical_plan_entry_maintenance_window_tactical_pla”

Every time my db schema gets regenerated 2 new changesets are added for dropping the existing index and creating a new one.

    <changeSet id="2" author="agnicio">
        <dropIndex indexName="idx_agnicio_tactical_plan_entry_maintenance_window_tactical_pla" tableName="agnicio_tactical_plan_entry_maintenance_window"/>
    </changeSet>
    <changeSet id="3" author="agnicio">
        <createIndex indexName="IDX_AGNICIO_TACTICAL_PLAN_ENTRY_MAINTENANCE_WINDOW_TACTICAL_PLAN_ENTRY" tableName="AGNICIO_TACTICAL_PLAN_ENTRY_MAINTENANCE_WINDOW">
            <column name="TACTICAL_PLAN_ENTRY_ID"/>
        </createIndex>
    </changeSet>

I guess during the creation of the index the name is cut off to 63 chars and the schema compare functionality does not recognize this.

I renamed the index to stop this infinite loop.

Hello! Thank you for reporting the issue with long index names. I have created a ticket to resolve this issue. For now, I am planning to automatically truncate index names when generated by the studio, and also add a corresponding inspection. Feel free to suggest your ideas with convenient ways to handle these situations.