Liquibase Best Practices

  • Separate DDL and DML
  • Keep one change per ChangeSet
  • never modify changeSets, create new oncs
  • use unique descriptive changelog id (use Ticket number?)
  • create one master changelog file to include initial and future migration changelogs
  • For Kubernetes deployments, create a standalone application to handle db migrations, and start it as an initContainer during deployment