Even when using JPA/Hibernate ORM, SQL migrations are essential:
- Version Control: Schema changes are tracked in version control alongside code
- Reproducible Deployments: Same schema across all environments (dev, staging, production)
- Production Safety:
ddl-auto=create drops all data on startup - unacceptable in production
- Team Collaboration: All developers have identical database schemas
- Data Migrations: Handle data transformations, not just schema changes
- Rollback Capability: Can revert schema changes if needed
- Audit Trail: Complete history of all database changes