Liquibase generate creation DDL

Hello guys ,
how can i run liquibase maven goal to drop all tables and recreate them all like hbm2ddl.create in hibernate ??
thanks

Hi @faiez777,

This is possible, maybe? But really Liquibase is really reading a master changelog and looking in various environments to see what changeset is eligible to be executed for that given environment. I would advise you:

  • drop all tables as a part of your CI/CD instrumentation (like the step before you run liquibase)
  • drop all liquibase tracking tables (databasechangelog and databasechangeloglock table)
  • run liquibase update (note your changelog would have to define all the tables you want to recreate)
  • Rinse and repeat.

If this does not work, would you please clarify your use case?

Thanks,

Ronak

1 Like