Prints the details and status information about all the migrations.
> gradle flywayInfo
Parameter | Required | Default | Description |
---|---|---|---|
url | YES | The jdbc url to use to connect to the database | |
driver | NO | Auto-detected based on url | The fully qualified classname of the jdbc driver to use to connect to the database |
user | NO | The user to use to connect to the database | |
password | NO | The password to use to connect to the database | |
connectRetries | NO | 0 | The maximum number of retries when attempting to connect to the database. After each failed attempt, Flyway will wait 1 second before attempting to connect again, up to the maximum number of times specified by connectRetries. |
initSql | NO | none | The SQL statements to run to initialize a new database connection immediately after opening it. |
schemas | NO | The default schema for the database connection | The schemas managed by Flyway. These schema names are case-sensitive.
Consequences:
|
table | NO | flyway_schema_history | The name of Flyway's schema history table. By default (single-schema mode) the schema history table is placed in the default schema for the connection provided by the datasource. When the flyway.schemas property is set (multi-schema mode), the schema history table is placed in the first schema of the list. |
locations | NO | filesystem:src/main/resources/db/migration | Locations to scan recursively for migrations. The location type is determined by its prefix. Unprefixed locations or locations starting with classpath: point to a package on the
classpath and may contain both SQL and Java-based migrations.Locations starting with filesystem: point to a directory on the filesystem, may only
contain SQL migrations and are only scanned recursively down non-hidden directories. |
sqlMigrationPrefix | NO | V | The file name prefix for versioned SQL migrations. Versioned SQL migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1.1__My_description.sql |
undoSqlMigrationPrefix Flyway Pro | NO | U | The file name prefix for undo SQL migrations. Undo SQL migrations are responsible for undoing the effects of the versioned migration with the same version. They have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to U1.1__My_description.sql |
repeatableSqlMigrationPrefix | NO | R | The file name prefix for repeatable SQL migrations. Repeatable SQL migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix , which using the defaults translates to R__My_description.sql |
sqlMigrationSeparator | NO | __ | The file name separator for Sql migrations |
sqlMigrationSuffixes | NO | .sql | The file name suffixes for SQL migrations. SQL migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1_1__My_description.sql Multiple suffixes (like .sql,.pkg,.pkb) can be specified for easier compatibility with other tools such as editors with specific file associations. |
encoding | NO | UTF-8 | The encoding of Sql migrations |
placeholderReplacement | NO | true | Whether placeholders should be replaced |
placeholders | NO | Placeholders to replace in Sql migrations | |
placeholderPrefix | NO | ${ | The prefix of every placeholder |
placeholderSuffix | NO | } | The suffix of every placeholder |
resolvers | NO | Fully qualified class names of custom MigrationResolver implementations to be used in addition to the built-in ones for resolving Migrations to apply. | |
skipDefaultResolvers | NO | false | Whether default built-in resolvers (sql, jdbc and spring-jdbc) should be skipped. If true, only custom resolvers are used. |
callbacks | NO | Fully qualified class names of Callback implementations to use to hook into the Flyway lifecycle. | |
skipDefaultCallbacks | NO | false | Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used. |
target | NO | latest version | 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.
|
outOfOrder | NO | false | 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. |
licenseKey Flyway Pro | NO | none | Your Flyway license key (FL01...). Not yet a Flyway Pro or Enterprise Edition customer? Request your Flyway trial license key to try out Flyway Pro and Enterprise Edition features free for 30 days. |
flyway {
driver = 'org.hsqldb.jdbcDriver'
url = 'jdbc:hsqldb:file:/db/flyway_sample;shutdown=true'
user = 'SA'
password = 'mySecretPwd'
connectRetries = 10
initSql = 'SET ROLE \'myuser\''
schemas = ['schema1', 'schema2', 'schema3']
table = 'schema_history'
locations = ['classpath:migrations1', 'migrations2', 'filesystem:/sql-migrations']
sqlMigrationPrefix = 'Migration-'
undoSqlMigrationPrefix = 'downgrade'
repeatableSqlMigrationPrefix = 'RRR'
sqlMigrationSeparator = '__'
sqlMigrationSuffixes = ['.sql', '.pkg', '.pkb']
encoding = 'ISO-8859-1'
placeholderReplacement = true
placeholders = [
'aplaceholder' : 'value',
'otherplaceholder' : 'value123'
]
placeholderPrefix = '#['
placeholderSuffix = ']'
resolvers = ['com.mycompany.proj.CustomResolver', 'com.mycompany.proj.AnotherResolver']
skipDefaultResolvers = false
callbacks = ['com.mycompany.proj.CustomCallback', 'com.mycompany.proj.AnotherCallback']
skipDefaultCallbacks = false
target = '1.1'
outOfOrder = false
}
> gradle flywayInfo Database: jdbc:h2:file:flyway.db (H2 1.3) +------------+---------+----------------+------+---------------------+---------+----------+ | Category | Version | Description | Type | Installed on | State | Undoable | +------------+---------+----------------+------+---------------------+---------+----------+ | Versioned | 1 | First | SQL | | Pending | Yes | | Versioned | 1.1 | View | SQL | | Pending | Yes | | Versioned | 1.2 | Populate table | SQL | | Pending | No | +------------+---------+----------------+------+---------------------+---------+----------+