Flyway

编程入门 行业动态 更新时间:2024-10-27 20:31:15
Flyway - 迁移到特定版本(Flyway - Migrate to specific version)

有没有办法告诉flyway只迁移到特定版本。 例如,我有4个版本,例如V1,V2,V3,V4脚本,我想只迁移到V3但不迁移到v4。

提前致谢。

Is there a way to tell flyway to migrate only to specific version? For e.g. I have 4 versions e.g. V1, V2, V3and V4 scripts and I want to migrate only to V3 but not to v4.

最满意答案

迁移任务具有“目标”属性,允许您指定该属性。

target - Flyway应考虑迁移的目标版本。 具有更高版本号的迁移将被忽略。 特殊值current指定架构的当前版本。

Command for Command: http : //flywaydb.org/documentation/commandline/migrate.html

The migrate Task has a "target" attribute which lets you specify that.

target - The target version up to which Flyway should consider migrations. Migrations with a higher version number will be ignored. The special value current designates the current version of the schema.

Doc for CommandLine: http://flywaydb.org/documentation/commandline/migrate.html

更多推荐

本文发布于:2023-07-18 19:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1164464.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Flyway

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!