Liquibase gradle plugin table column order

Hi,

We have a Spring Boot application with JPA entity beans and we use Gradle for building the project etc.
I use the Liquibase Gradle plugin to generate the changelog from the entity beans which all works fine.
My question is, the changelog that is generated is doing so with the table columns is alphabetical order and not in the order that they are specified in the JPA entity bean. Any way to preserve the order that they were specified in?

Thanks

Hi @Iain, We generate the changelog by looking at the database, so it is a best practice to have it inspected for correctness and completeness before being deployed.

Hi,

This is a new application hence no dB tables exist (in fact there is not even an Oracle user specified in the dB so we run a SQL script in a pre-process to create it before Liquibase is run) which is why we generate the changelog (for the first time) via the Liquibase gradle plugin using the JPA entity beans. My original question was that the Liquibase gradle plugin task to generate the changelog based on the beans was that it was not doing so in the correct column order as specified in the beans but alphabetically. Anyway in the end I just had to modify the generated changelog to place the columns in the correct order but it would have been nice if the plugin task did so.

Thanks!
Iain