3

I am integrating liquibase in Spring boot project. I am planning to let hibernate run DB schema changes and run remaining DML queries via liquibase.

  • Is it good practice to manage DB changes via both Liquibase and Hibernate at the same time ?

  • Are there any cons using the same?

Kapish Malik
  • 31
  • 1
  • 3

1 Answers1

0

Why not running everything from liquibase script? https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-liquibase-database-migrations-on-startup

  • Hey I can do so. But it will be double effort to write entity class and on other hand its equivalent query. Just wanted to know if it is good practise to do so. – Kapish Malik Feb 25 '19 at 14:42
  • Theoretically, if hibernate ddl auto update worked in development, it should work in production as well. Yet in reality, it's not always the case. Plus liquibase provides hash with every schema update to double check automatically. – Romas Augustinavičius Feb 25 '19 at 14:48