开发者

Liquibase diffChangeLog against a Hibernate mapping definition

This question is related to开发者_如何学C "Hibernate using JPA (annotated Entities) and liquibase".

I was actually wondering what to expect when doing a Liquibase diff against a Hibernate mapping definition.

What it seems to produce: A liquibase changelog that migrates the state of my hibernate mappings to the current image of the database.

What I was hoping for: A liquibase changelog that migrates the existing (old) database to reflect the changes in my (new) hibernate mappings.

Am I expecting the wrong thing? or am I doing something wrong?

Thank you for letting me know! J.


The answer was too obvious...

It was just a matter of flipping the base- and target system :-)

 --username=un \
 --password=pw \
 --url=jdbc:mysql:///mydb \
 diffChangeLog \
 --baseUrl="hibernate:/hibernate.hbm.xml"

becomes:

 --url="hibernate:/hibernate.hbm.xml" \
 diffChangeLog \
 --baseUrl=jdbc:mysql:///mydb \
 --baseUsername=un \
 --basePassword=pw

Sorry! Time for sleep :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜