Hibernate: ddl-auto=update is not a migration tool

It adds columns but never removes or alters them, and it never runs in a reviewable order.

Code
// Development only:
spring.jpa.hibernate.ddl-auto: update

// Production:
spring.jpa.hibernate.ddl-auto: validate
// with Flyway or Liquibase owning the schema
Output
update:   adds the new column, silently ignores a renamed one, leaves the old
          column behind for ever.
validate: fails at startup if the schema does not match - which is what you want.
Advertisement

Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.

Published 2026-08-11