We are choosing tool for database version control and migration. We have decided to use it for big project with different type of SQL DB. We expect to use Hibernate for majority part of base. We expect the Hibernate will be able to apply about 80% changes itself and the other changes require manual improvement.
We’d like to automate this process. A programmer shouldn’t write 80% of the change sets for database himself. Migration software has to do things for programmer. But programmer should have the opportunity to make a manual changeset or to change easy the changeset had been proposed in 20% cases.
We considered the liquidBase hibernate plugin as possible candidate but it has been no suitable. Plugin makes diff between exist base and “ideal” Hibernate base. As result our changeset will consist of the new hibernate changes and a lot of previous manual changes. It won’t be useful.
Useful solution is making diff between the changelog and the real base.
How does it work? We have the changelog of base and the real base in state by changelog. We modify a Hibernate entity and after that hbm2ddl modifies our real base. Then we make diff between our real base and changelog (DatabaseSnapshot have been made by changelog). As result we have changeset with our hibernate modifications and we can add it to changelog.
Do you think this solving is good? Do you see any problems or limitations? Do you know any pitfalls?
We would regard any help!