Table of Contents

Database Migration - Flyway

About

Flyway is a database migration tool.

Structure

Type of script

State

State by script:

Syntax

flyway [options] command

By default, the configuration will be read from conf/flyway.conf.

Options passed from the command-line override the configuration.

Commands:

Options (Format: -key=value):

Flags


Example

flyway -user=myuser -password=s3cr3t -url=jdbc:h2:mem -placeholders.abc=def migrate

Management

info

flyway info
+------------+---------+---------------------+------+---------------------+----------+
| Category   | Version | Description         | Type | Installed On        | State    |
+------------+---------+---------------------+------+---------------------+----------+
| Versioned  | 1       | Create person table | SQL  | 2018-04-05 07:03:22 | Success  |
| Versioned  | 2       | Add people.sql      | SQL  | 2018-04-05 07:03:22 | Success  |
| Repeatable |         | People view.sql     | SQL  | 2018-04-05 07:03:42 | Outdated |
| Repeatable |         | People view.sql     | SQL  |                     | Pending  |
+------------+---------+---------------------+------+---------------------+----------+

Documentation / Reference