Skip to main content
InterviewHubPRO
Section Overview
Q24

Question 24 of 50

Part 2: Persistence, Transactions & Security (11 - 24)

48%
Spring Boot & Microservices (50 Qs)•Part 2: Persistence, Transactions & Security (11 - 24)

What is Flyway or Liquibase and why use them over `ddl-auto=update`?

junior LevelState ManagementSecurity & AuthDatabases & SQL

In Simple Words:

  • Never use hibernate.ddl-auto=update in production: it cannot rename columns, cannot handle complex data transformations, and can inadvertently drop constraints.
  • Flyway: Executes versioned SQL migration scripts (V1__init.sql, V2__add_status.sql) sequentially, tracking executed migrations in a flyway_schema_history table, guaranteeing repeatable, deterministic database schema across all environments.