spring项目接入flyway(二)特性(简写,后续补充实操)

11 篇文章 0 订阅

 

官方文档:https://flywaydb.org/documentation/usage/maven/

 

flyway需要Maven3.x版本,支持java8及以上版本

flyway具有以下几种功能:

 

一、migrate

Migrates the schema to the latest version. Flyway will create the schema history table automatically if it doesn’t exist.

 

二、clean

Drops all objects (tables, views, procedures, triggers, …) in the configured schemas.
The schemas are cleaned in the order specified by the schemas property.

 

 

三、info

Prints the details and status information about all the migrations.

 

 

 

四、validate

Validate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly.

Validation fails if

  • differences in migration names, types or checksums are found
  • versions have been applied that aren’t resolved locally anymore
  • versions have been resolved that haven’t been applied yet

 

 

 

 

五、undo

Undoes the most recently applied versioned migration.

 

 

 

六、baselinne

Baselines an existing database, excluding all migrations up to and including baselineVersion.

 

 

 

 

七、repair

Repairs the Flyway schema history table. This will perform the following actions:

  • Remove any failed migrations on databases without DDL transactions
    (User objects left behind must still be cleaned up manually)
  • Realign the checksums, descriptions and types of the applied migrations with the ones of the available migrations

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值