Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Hibernate’s ddl-auto=update can change a database schema during application startup, but its documented behavior alone does not explain why a production table ended up with two columns. Treat the cause as unconfirmed until you compare the deployed mapping, database catalog, migration history, startup DDL, and deployment configuration. Preserve the data, identify the authoritative column, then correct the schema with a reviewed migration.
What ddl-auto=update does—and what it does not prove
Spring Boot exposes Hibernate schema generation through spring.jpa.hibernate.ddl-auto. The documented values are none, validate, update, create, and create-drop. The default is contextual: Spring Boot defaults to create-drop for an embedded database when no Flyway or Liquibase schema manager is detected; otherwise it defaults to none. It does not generally default production databases to update. See Spring Boot’s database initialization documentation.
Hibernate describes update as exporting schema elements it considers missing and altering incorrect column types. In practical terms, Hibernate compares mappings with the schema it sees and may issue schema changes during initialization. That description does not establish which SQL ran in this incident, which database or dialect was involved, or why two columns remained. The Hibernate automatic schema export documentation describes the feature, not the cause of this specific outcome.
Whether the setting was present in staging, production, or both—and which application version actually connected to production—must be established from configuration and deployment records. The title alone cannot show that Hibernate created both columns.
Investigate why two columns exist before changing either
Several explanations are plausible, but none is confirmed without incident evidence. A property or explicit column mapping may have been renamed; a physical naming strategy may have changed; staging and production may have started with different schema states; different application versions may have connected to the same database; or another process may have managed DDL independently.
Build a timeline and compare the exact deployed build with the live schema. Collect:
Rank #2
- The entity annotations or XML mappings and the configured physical naming strategy for the deployed version.
- Spring Boot, Hibernate, database, and dialect versions, along with the database and schema/catalog involved.
- The database catalog’s exact table and column names, types, nullability, constraints, indexes, and the data in both columns.
- Migration history, deployment order, relevant application configuration, and Hibernate startup SQL or DDL logs.
- Evidence of which columns the running application reads and writes, including whether multiple application versions were active.
Use the catalog and logs to determine what changed and when. A mapping difference or migration record may explain the duplicate; do not infer one merely from the column names.
Fix the production schema without losing data
- Stop further automatic mutation. Disable Hibernate schema changes for the affected production profile while preserving relevant logs and taking a recoverable backup or snapshot under your normal operational procedures.
- Establish the actual state. Inspect the catalog and compare both columns’ definitions and contents with the exact deployed mapping. Review migration records and startup logs to establish whether the columns appeared together or at different times.
- Determine which column is canonical. Trace reads, writes, and existing values before deciding. If values must be copied, merged, or reconciled, design and test that as a reviewed migration with a recovery plan. Do not drop a column just because its name looks obsolete.
- Apply a reviewed migration. Make the intended schema change through an incremental migration after confirming how the application and data will behave during deployment. Verify the result against the catalog and the application’s expected mapping.
- Use a non-mutating Hibernate mode in deployed profiles. Choose
validateif startup schema checks are desired, ornoneto disable Hibernate schema action. Confirm the behavior against the project’s actual dependency versions and environment.
Use one mechanism to manage schema changes
Hibernate’s ORM documentation says: “Although the automatic schema generation is very useful for testing and prototyping purposes, in a production environment, it’s much more flexible to manage the schema using incremental migration scripts.” See the Hibernate ORM schema generation guidance.
Spring Boot identifies Flyway and Liquibase as higher-level migration tools and advises using a single mechanism to create and initialize the schema when one is selected. Avoid having Hibernate schema generation and a migration tool independently initialize or mutate the same database. See Spring Boot’s database initialization guidance.
Flyway documents migration scripts for DDL operations such as CREATE, ALTER, and DROP. That capability does not guarantee that a particular migration is safe or reversible; safety depends on its contents, deployment sequence, and recovery plan. See Flyway’s migration concepts.
Rank #4
Choose a migration tool for your workflow
The cited documentation does not establish that Flyway or Liquibase is universally superior. Evaluate either against the database and SQL dialect you use, how changes are authored and reviewed, how migration order and history are recorded, and how deployment compatibility, recovery, rollback, and schema drift are handled in your CI/CD process.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchThe cited Spring Boot and Hibernate documentation is rolling documentation. For a specific incident, check the documentation and behavior that match the application’s actual Spring Boot, Hibernate, database, and dialect versions.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

