开发者

Running liquibase in java code

开发者 https://www.devze.com 2023-04-09 03:43 出处:网络
I\'m trying to execute in Java code analogue of Ant\'s \"updateDatabase\" task: Main.main( new String[]{\"--defaultsFile=db/properties/db.test.properties --logLevel=debug update\"} );

I'm trying to execute in Java code analogue of Ant's "updateDatabase" task:

Main.main( new String[]{"--defaultsFile=db/properties/db.test.properties --logLevel=debug update"} );

First, I could not find an updateDatabase command. I've tried: update, updateSQL, but all the time I'm getting:

Errors:
  Command not passed

My db.test.propertie开发者_开发百科s file if it may help:

#liquibase.properties
driver: org.hsqldb.jdbcDriver
url: jdbc:hsqldb:mem:datasourcedb
username: TEST
password: TEST
changeLogFile: db/changelog/db.changelog-master.xml

I've used the ":" symbol as a separator in property file as described in liquibase.properties

What am I doing wrong? Please help.


Use separate strings instead of one big String:

Main.main( new String[]{
   "--defaultsFile=db/properties/db.test.properties",
   "--logLevel=debug",
   "update"
} );
0

精彩评论

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

关注公众号