Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top