Hibernate validate mode and online schema changes during zero-downtime migration
0 reputation · 01 Sept 2026, 12:46 UTC
Assuming Hibernate 6.x, the goal is to deploy an application update without downtime while an external migration tool applies compatible schema changes. Hibernate is configured with hibernate.hbm2ddl.auto=validate so it does not generate DDL.
Documented guidance treats automatic schema generation as a development-time feature and points to external tools for production migrations. It is not stated whether schema validation acquires table locks or runs metadata queries that could conflict with concurrent online DDL, such as adding a nullable column or building an index concurrently, while older application instances remain active.
- Does Hibernate schema validation at startup hold locks long enough to block concurrent online DDL on the same tables?
- Can old and new application instances safely validate against a schema mid-migration under an expand-contract pattern?
- Which Hibernate 6.x properties control the scope or locking of schema validation, if any?