I use AI a lot for drafting code. One issue I have run into repeatedly is generating stable, consistent Liquibase scripts.
Even with the Jmix skills and my own additional instructions on top, the AI-generated Liquibase scripts are not consistent.
Index names and structure are a major issue. Indexes are repeatedly being dropped and re-created because the AI-generated version does not match Jmix expectations.
Instead of trying to use AI to generate scripts, it would be safer and easier to have the AI call the existing script generation.
I guess this could be a Gradle script or, in the short term, an MCP tool that can call the Jmix capability.
Another approach could be to make Studio more tolerant of existing indexes.
Won’t be enough. It’s not just naming, It’s really an inocrrect script. You could try improving skills but I also already experimented and not getting deterministic results.
One recurring problem is missing partial indexes on postgres unique constrains. About half of the time it omits the partial index
<modifySql>
<append value="where DELETED_DATE is null"/>
</modifySql>