Update column after it is created and column name conflict with reserved words

Hi all,

It seems that:

  1. When a column which is already created, once updated in the Java code, ddl-auto with update doesn’t modify it. I can understand minimizing its length may mandate data change before the update happens, but why it is not done when increasing the length. Even minimizing can automatically happen if there is no record more than the needed length.
  2. When a column/field name conflicts with the reserved words, there is an exception. I guess Hibernate can have a list of all reserved words, and gracefully handles these conditions.

I am asking if there is a possibility to consider these scenarios, so the Hibernate user is not encountered with some surprises along the way.

Thanks all.

Not sure what you mean by that. If you change the name, update will cause a column drop and column add. If you don’t like that, and we generally discourage the use of ddl-auto for production deployments, you should use a schema migration tool like Liquibase or Flyway to handle these schema changes.

We do have such a list, but as you can imagine, such an approach is prone to errors. Not all keywords are problematic in all scenarios. If you have a specific problem, you can create an issue on our JIRA and we will try to resolve that.