我们已经集成了flyway和Redshift,并且我们使用它作为一个简单的java主程序来运行我们所有的模式迁移。我们还使用info命令来打印数据库的当前版本,但是这个命令成功地运行了,或者至少看起来运行了,但没有打印版本号。我们有4.2版本的flyway jar。我们可能遗漏了什么?谢谢
发布于 2017-08-10 14:12:17
要在java代码中手动重新创建info command line option所做的工作,您可以复制其实现所做的工作(从source中):
MigrationInfoDumper.dumpToAsciiTable(flyway.info().all())
文档中的示例如下所示:
+-------------+------------------------+---------------------+---------+
| Version | Description | Installed on | State |
+-------------+------------------------+---------------------+---------+
| 1 | Initial structure | | Pending |
| 1.1 | Populate table | | Pending |
| 1.3 | And his brother | | Pending |
+-------------+------------------------+---------------------+---------+https://stackoverflow.com/questions/45603704
复制相似问题