想要在现有架构版本之间添加新的flyway

时间:2017-10-17 03:30:13

标签: flyway

我在schema_version表中有v1,v2版本。 我想在其间添加版本v1.1。 我如何使用cmd进行手动删除v2并再次运行flyway migrate?

1 个答案:

答案 0 :(得分:1)

打开outOfOrder运行;请参阅migrate docs

Option: outOfOrder
Required: No
Default: false
Description: Allows migrations to be run "out of order". 
If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored.

如果您通过命令行运行,请执行以下操作:

  1. 将新迁移添加为V1.1__description.sql或类似
  2. 使用-outOfOrder true
  3. 再次运行flyway