0

我想编写执行此类任务的代码:

check if a given database exists.
1a-->if no, then create a DB, make some tables in it and some columns too.

   1.1-->Check if certain columns in a "list" exist. 
         Create those columns which don't exist yet.
   1.2--> once 1.1 is done, populate these tables with some test data. 

1b-->else check if certain tables exist and create them if they 
     don't exist. After that, do the stuff mentioned in 1.1 and 1.2 

我是自己编写代码还是有针对此类任务已经存在的“解决方案”?

4

2 回答 2

2

我不知道您所要求的任何内置内容,但我相信您可以使用LiquiBase实现您所需要的。

于 2012-07-31T22:43:12.730 回答
2

我可以推荐一些其他的flyway,希望你会觉得它更容易掌握

于 2012-07-31T23:38:39.423 回答