Flyway (flyway
)
flyway
端点提供有关 Flyway 执行的数据库迁移的信息。
获取迁移信息
要获取迁移信息,向 /actuator/flyway
发送 GET
请求,如下面的基于 curl 的示例所示:
$ curl 'http://localhost:8080/actuator/flyway' -i -X GET
响应结果类似于以下内容:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 516
{
"contexts" : {
"application" : {
"flywayBeans" : {
"flyway" : {
"migrations" : [ {
"type" : "SQL",
"checksum" : -156244537,
"version" : "1",
"description" : "init",
"script" : "V1__init.sql",
"state" : "SUCCESS",
"installedBy" : "SA",
"installedOn" : "2025-05-25T10:02:40.576Z",
"installedRank" : 1,
"executionTime" : 12
} ]
}
}
}
}
}
响应结构
响应包含应用程序 Flyway 迁移的详细信息。 下表描述了响应的结构:
Path | Type | Description |
---|---|---|
|
|
Application contexts keyed by id |
|
|
Migrations performed by the Flyway instance, keyed by Flyway bean name. |
|
|
Checksum of the migration, if any. |
|
|
Description of the migration, if any. |
|
|
Execution time in milliseconds of an applied migration. |
|
|
User that installed the applied migration, if any. |
|
|
Timestamp of when the applied migration was installed, if any. |
|
|
Rank of the applied migration, if any. Later migrations have higher ranks. |
|
|
Name of the script used to execute the migration, if any. |
|
|
State of the migration. ( |
|
|
Type of the migration. |
|
|
Version of the database after applying the migration, if any. |
|
|
Id of the parent application context, if any. |