문제

I am looking to use a versioned database migrations tool like DBdeploy in a java project which uses Hibernate as the ORM and uses Gradle as the build system. I am unable to lookup any documentation on running DBDeploy on Gradle. Also is there a Hibernate based migrations manager, which can understand schema changes by looking at changes in Hibernate classes/definitions?

도움이 되었습니까?

해결책

Since dbdeploy has an Ant task, it should be straightforward to use from Gradle. See Using Ant Tasks in the Gradle User Guide.

다른 팁

I am unable to lookup any documentation on running DBDeploy on Gradle.

Almost any build system can likely call either the ant task or the command-line interface for dbdeploy.

Also is there a Hibernate based migrations manager, which can understand schema changes by looking at changes in Hibernate classes/definitions?

You might want to look at Liquibase. I haven't actually used it (I've used dbdeploy), but it has hibernate integration that looks like what you want.

this post shows how to use DBDeploy in Gradle: http://blog.codeborne.com/2012/09/using-dbdeploy-in-gradle.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top