This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

The flyway endpoint provides information about database migrations performed by Flyway.spring-doc.cn

Retrieving the Migrations

To retrieve the migrations, make a GET request to /actuator/flyway, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/flyway' -i -X GET

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 515

{
  "contexts" : {
    "application" : {
      "flywayBeans" : {
        "flyway" : {
          "migrations" : [ {
            "type" : "SQL",
            "checksum" : -156244537,
            "version" : "1",
            "description" : "init",
            "script" : "V1__init.sql",
            "state" : "SUCCESS",
            "installedBy" : "SA",
            "installedOn" : "2024-10-03T19:30:11.215Z",
            "installedRank" : 1,
            "executionTime" : 8
          } ]
        }
      }
    }
  }
}

Response Structure

The response contains details of the application’s Flyway migrations. The following table describes the structure of the response:spring-doc.cn

Path Type Description

contextsspring-doc.cn

Objectspring-doc.cn

Application contexts keyed by idspring-doc.cn

contexts.*.flywayBeans.*.migrationsspring-doc.cn

Arrayspring-doc.cn

Migrations performed by the Flyway instance, keyed by Flyway bean name.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].checksumspring-doc.cn

Numberspring-doc.cn

Checksum of the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].descriptionspring-doc.cn

Stringspring-doc.cn

Description of the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].executionTimespring-doc.cn

Numberspring-doc.cn

Execution time in milliseconds of an applied migration.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedByspring-doc.cn

Stringspring-doc.cn

User that installed the applied migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedOnspring-doc.cn

Stringspring-doc.cn

Timestamp of when the applied migration was installed, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedRankspring-doc.cn

Numberspring-doc.cn

Rank of the applied migration, if any. Later migrations have higher ranks.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].scriptspring-doc.cn

Stringspring-doc.cn

Name of the script used to execute the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].statespring-doc.cn

Stringspring-doc.cn

State of the migration. (PENDING, ABOVE_TARGET, BELOW_BASELINE, BASELINE_IGNORED, BASELINE, IGNORED, MISSING_SUCCESS, MISSING_FAILED, SUCCESS, UNDONE, AVAILABLE, FAILED, OUT_OF_ORDER, FUTURE_SUCCESS, FUTURE_FAILED, OUTDATED, SUPERSEDED, DELETED)spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].typespring-doc.cn

Stringspring-doc.cn

Type of the migration.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].versionspring-doc.cn

Stringspring-doc.cn

Version of the database after applying the migration, if any.spring-doc.cn

contexts.*.parentIdspring-doc.cn

Stringspring-doc.cn

Id of the parent application context, if any.spring-doc.cn

Path Type Description

contextsspring-doc.cn

Objectspring-doc.cn

Application contexts keyed by idspring-doc.cn

contexts.*.flywayBeans.*.migrationsspring-doc.cn

Arrayspring-doc.cn

Migrations performed by the Flyway instance, keyed by Flyway bean name.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].checksumspring-doc.cn

Numberspring-doc.cn

Checksum of the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].descriptionspring-doc.cn

Stringspring-doc.cn

Description of the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].executionTimespring-doc.cn

Numberspring-doc.cn

Execution time in milliseconds of an applied migration.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedByspring-doc.cn

Stringspring-doc.cn

User that installed the applied migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedOnspring-doc.cn

Stringspring-doc.cn

Timestamp of when the applied migration was installed, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].installedRankspring-doc.cn

Numberspring-doc.cn

Rank of the applied migration, if any. Later migrations have higher ranks.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].scriptspring-doc.cn

Stringspring-doc.cn

Name of the script used to execute the migration, if any.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].statespring-doc.cn

Stringspring-doc.cn

State of the migration. (PENDING, ABOVE_TARGET, BELOW_BASELINE, BASELINE_IGNORED, BASELINE, IGNORED, MISSING_SUCCESS, MISSING_FAILED, SUCCESS, UNDONE, AVAILABLE, FAILED, OUT_OF_ORDER, FUTURE_SUCCESS, FUTURE_FAILED, OUTDATED, SUPERSEDED, DELETED)spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].typespring-doc.cn

Stringspring-doc.cn

Type of the migration.spring-doc.cn

contexts.*.flywayBeans.*.migrations.[].versionspring-doc.cn

Stringspring-doc.cn

Version of the database after applying the migration, if any.spring-doc.cn

contexts.*.parentIdspring-doc.cn

Stringspring-doc.cn

Id of the parent application context, if any.spring-doc.cn