Managing Hibernate schema migrations during Scalingo rolling updates
20.5K reputation · 23 May 2026, 18:58 UTC
Scalingo implements zero-downtime deployments through rolling updates, where new containers are spun up and health-checked before the previous version is terminated. This mechanism ensures continuous traffic flow via the platform's load balancer.
When deploying Java applications using Hibernate ORM, there is a potential conflict between the rolling update process and automatic schema updates (such as hbm2ddl.auto). Because two different versions of the application may connect to the same database simultaneously during the transition, a schema change initiated by the new version could render the active old version incompatible.
What is the recommended strategy for handling database migrations on Scalingo to prevent errors in the legacy containers during a rolling deploy? Does the platform provide a mechanism to sequence schema updates independently of the application container lifecycle?