My requirement is to sync DEV database changes to QA environment.I am using spring boot and hibernate as the ORM is there any way to sync database schema changes and table data changes from DEV to QA.What is the best way
2 Answers
This is not the direct answer to the current question, but it will make life easier in future in similar situations. It is worth exploring.
It is better if you can use a migration tool and maintain your sql versions properly.
Flyway is such tool which will maintain and apply new sql versions to the database everytime you start the server. It will only apply the new versions, everytime you need a change in db, you need to write that sql statement in new version. You can find lot of help online, bellow is the link which explains a bit on how to use it with spring boot.
Comments
Another alternative is to use Liquibase, which has a Hibernate extension. It worked rather well for us when we were at Spring Boot 1.3.5 and Hibernate 4.3, but I'm having a hard time making it work with Spring Boot 1.4.2 and Hibernate 5.