Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
npm-debug.log
tmp
.DS_Store
83 changes: 18 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The plugin uses [Flyway](http://flywaydb.org) "The Agile Database Migration Fram
So, you have to install Java and have the `java` executable available in your PATH.

## Flyway version
The plugin uses [Flyway](http://flywaydb.org) 3.2.
The plugin uses [Flyway](http://flywaydb.org) 4.1.

## The "flyway" task

Expand Down Expand Up @@ -127,82 +127,32 @@ The only commands which are supported for the moment are `clean`, `baseline`, `m

### Options

Options' descriptions come from [Flyway's documentation](http://flywaydb.org/documentation/commandline/).

> **NOTE:** These options may be out of sync with the official documentation. Please only use this version as a basic reference and consult the official docs for accurate information.
Options' descriptions come from [Flyway's documentation](https://flywaydb.org/documentation/commandline/).

#### clean

|option|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|
|schemas|no|_default schema of the connection_|Comma-separated case-sensitive list of schemas managed by Flyway. <br><br> The schemas will be cleaned in the order of this list.|
|jarDir|no|`<install-dir>`/jars|The directory containing the JDBC driver|
See [clean command on flyway's documentation](https://flywaydb.org/documentation/commandline/clean)

#### baseline

|option|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|
|schemas|no|_default schema of the connection_|Comma-separated case-sensitive list of schemas managed by Flyway. <br><br> The first schema will be the one containing the metadata table.|
|table|no|`schema_version`|The name of Flyway's metadata table. <br><br> By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource. <br><br> When the `schemas` property is set (multi-schema mode), the metadata table is placed in the first schema of the list.|
|jarDir|no|`<install-dir>`/jars|The directory containing the JDBC driver|
|baselineVersion|no|1|The initial version to put in the database|
|baselineDescription|no|`<< Flyway Baseline >>`|The description of the initial version|
See [baseline command on flyway's documentation](https://flywaydb.org/documentation/commandline/baseline)

#### migrate

|option|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|
|schemas|no|_default schema of the connection_|Comma-separated case-sensitive list of schemas managed by Flyway. <br><br> The first schema in the list will be automatically set as the default one during the migration. It will also be the one containing the metadata table.|
|table|no|`schema_version`|The name of Flyway's metadata table. By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource. When the `schemas` property is set (multi-schema mode), the metadata table is placed in the first schema of the list.|
|locations|no|filesystem:`<install-dir>`/sql|Comma-separated list of locations to scan recursively for migrations. The location type is determined by its prefix. <br><br> Unprefixed locations or locations starting with `classpath:` point to a package on the classpath and may contain both sql and java-based migrations. <br><br> Locations starting with `filesystem:` point to a directory on the filesystem and may only contain sql migrations.|
|jarDir|no|`<install-dir>`/jars|The directory containing the JDBC driver|
|sqlMigrationPrefix|no|V|The file name prefix for sql migrations|
|sqlMigrationSuffix|no|.sql|The file name suffix for sql migrations|
|encoding|no|UTF-8|The encoding of sql migrations|
|placeholders._name_|no||Placeholders to replace in sql migrations|
|placeholderPrefix|no|${|The prefix of every placeholder|
|placeholderSuffix|no|}|The suffix of every placeholder|
|target|no|_latest version_|The target version up to which Flyway should run migrations. Migrations with a higher version number will not be applied.|
|outOfOrder|no|false|Allows migrations to be run "out of order". <br><br> 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.|
|validateOnMigrate|no|false|Whether to automatically call validate or not when running migrate. <br><br> For each sql migration a CRC32 checksum is calculated when the sql script is executed. The validate mechanism checks if the sql migration in the classpath still has the same checksum as the sql migration already executed in the database.|
|cleanOnValidationError|no|false|Whether to automatically call clean or not when a validation error occurs. <br><br> This is exclusively intended as a convenience for development. Even tough we strongly recommend not to change migration scripts once they have been checked into SCM and run, this provides a way of dealing with this case in a smooth manner. The database will be wiped clean automatically, ensuring that the next migration will bring you back to the state checked into SCM. <br><br> **Warning! Do not enable in production!**|
|baselineOnMigrate|no|false|Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table. This schema will then be initialized with the `baselineVersion` before executing the migrations. Only migrations above `baselineVersion` will then be applied. <br><br> This is useful for initial Flyway production deployments on projects with an existing DB. <br><br> Be careful when enabling this as it removes the safety net that ensures Flyway does not migrate the wrong database in case of a configuration mistake!
|baselineVersion|no|1|The initial version to put in the database|
|baselineDescription|no|`<< Flyway Baseline >>`|The description of the initial version|
See [migrate command on flyway's documentation](https://flywaydb.org/documentation/commandline/migrate)

#### repair

See [repair command on flyway's documentation](https://flywaydb.org/documentation/commandline/repair)

#### validate

|option|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|
|schemas|no|_default schema of the connection_|Comma-separated case-sensitive list of schemas managed by Flyway. <br><br> The first schema will be the one containing the metadata table.|
|table|no|`schema_version`|The name of Flyway's metadata table. By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource. When the `schemas` property is set (multi-schema mode), the metadata table is placed in the first schema of the list.|
|locations|no|filesystem:`<install-dir>`/sql|Comma-separated list of locations to scan recursively for migrations. The location type is determined by its prefix. <br><br> Unprefixed locations or locations starting with `classpath:` point to a package on the classpath and may contain both sql and java-based migrations. <br><br> Locations starting with `filesystem:` point to a directory on the filesystem and may only contain sql migrations.|
|jarDir|no|`<install-dir>`/jars|The directory containing the JDBC driver|
|sqlMigrationPrefix|no|V|The file name prefix for sql migrations|
|sqlMigrationSuffix|no|.sql|The file name suffix for sql migrations|
|encoding|no|UTF-8|The encoding of sql migrations|
|placeholders._name_|no||Placeholders to replace in sql migrations|
|placeholderPrefix|no|${|The prefix of every placeholder|
|placeholderSuffix|no|}|The suffix of every placeholder|
|target|no|_latest version_|The target version up to which Flyway should run migrations. Migrations with a higher version number will not be applied.|
|outOfOrder|no|false|Allows migrations to be run "out of order". <br><br> 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.|
|cleanOnValidationError|no|false|Whether to automatically call clean or not when a validation error occurs. <br><br> This is exclusively intended as a convenience for development. Even tough we strongly recommend not to change migration scripts once they have been checked into SCM and run, this provides a way of dealing with this case in a smooth manner. The database will be wiped clean automatically, ensuring that the next migration will bring you back to the state checked into SCM. <br><br> **Warning! Do not enable in production!**|
See [validate command on flyway's documentation](https://flywaydb.org/documentation/commandline/validate)

#### info

See [info command on flyway's documentation](https://flywaydb.org/documentation/commandline/info)


### Usage Examples

Expand All @@ -222,6 +172,9 @@ Simply call the [Flyway](http://flywaydb.org) targets you've defined inside your

## Release History

### 0.4.1
* Upgrade to Flyway 4.1.2

### 0.3.2
* Upgrade to Flyway 3.2

Expand Down
Binary file removed flyway-3.2.1/drivers/h2-1.3.170.jar
Binary file not shown.
Binary file removed flyway-3.2.1/drivers/hsqldb-2.3.2.jar
Binary file not shown.
Binary file removed flyway-3.2.1/drivers/jna-3.3.0-platform.jar
Binary file not shown.
Binary file removed flyway-3.2.1/drivers/jna-3.3.0.jar
Binary file not shown.
Binary file removed flyway-3.2.1/drivers/mariadb-java-client-1.1.7.jar
Binary file not shown.
Binary file removed flyway-3.2.1/drivers/postgresql-9.3-1102-jdbc4.jar
Binary file not shown.
Binary file removed flyway-3.2.1/lib/flyway-commandline-3.2.1.jar
Binary file not shown.
Binary file removed flyway-3.2.1/lib/flyway-core-3.2.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion flyway-3.2.1/LICENSE.txt → flyway-4.1.2/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2010-2015 Axel Fontaine
Copyright 2010-2017 Boxfuse GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This distribution contains third-party software subject to various licenses:

Java Runtime Environment 8.31 (jre/*)
Java Runtime Environment 8.74 (jre/*)
-------------------------------------
Source: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Expand Down Expand Up @@ -77,8 +77,8 @@ Last updated 02 April 2013



Derby 10.11.1.1 (drivers/derby-10.11.1.1.jar)
Derby Client 10.11.1.1 (drivers/derbyclient-10.11.1.1.jar)
Derby 10.12.1.1 (drivers/derby-10.12.1.1.jar)
Derby Client 10.12.1.1 (drivers/derbyclient-10.12.1.1.jar)
----------------------------------------------------------
Source: http://db.apache.org/derby/

Expand All @@ -99,7 +99,7 @@ Copyright 2004-2014 The Apache Software Foundation



H2 1.3.170 (drivers/h2-1.3.170.jar)
H2 1.4.193 (drivers/h2-1.4.193.jar)
-----------------------------------
Source: http://www.h2database.com/

Expand All @@ -112,7 +112,7 @@ An original copy of the license agreement can be found at: http://www.h2database



HSQLDB 2.3.2 (drivers/hsqldb-2.3.2.jar)
HSQLDB 2.3.4 (drivers/hsqldb-2.3.4.jar)
---------------------------------------
Source: http://hsqldb.org/

Expand Down Expand Up @@ -1167,7 +1167,7 @@ DAMAGES.



MariaDB Java Client 1.1.7 (drivers/mariadb-java-client-1.1.7.jar)
MariaDB Java Client 1.4.5 (drivers/mariadb-java-client-1.4.5.jar)
-----------------------------------------------------------------
Source: https://mariadb.com/kb/en/mariadb/client-libraries/mariadb-java-client/

Expand Down Expand Up @@ -1723,7 +1723,8 @@ That's all there is to it!



PostgreSQL JDBC Driver 9.3-1102-jdbc4 (drivers/postgresql-9.3-1102-jdbc4.jar)

PostgreSQL JDBC Driver 9.4.1208.jre6 (drivers/postgresql-9.4.1208.jre6.jar)
-----------------------------------------------------------------------------
Source: https://github.com/pgjdbc/pgjdbc

Expand Down
6 changes: 3 additions & 3 deletions flyway-3.2.1/README.txt → flyway-4.1.2/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Database Migrations Made Easy.

Documentation
-------------
You can find getting started guides and reference documentation at http://flywaydb.org
You can find getting started guides and reference documentation at https://flywaydb.org


Contributing
------------
Here is the info on how you can contribute in various ways to the project: http://flywaydb.org/contribute/
Here is the info on how you can contribute in various ways to the project: https://flywaydb.org/documentation/contribute/


License
-------
Copyright (C) 2010-2014 Axel Fontaine
Copyright (C) 2010-2015 Axel Fontaine

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
58 changes: 53 additions & 5 deletions flyway-3.2.1/conf/flyway.conf → flyway-4.1.2/conf/flyway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,33 @@
# * = driver must be downloaded and installed in /drivers manually
# DB2* : jdbc:db2://<host>:<port>/<database>
# Derby : jdbc:derby:<subsubprotocol:><databaseName><;attribute=value>
# EnterpriseDB : jdbc:edb://<host>:<port>/<database>?<key1>=<value1>&<key2>=<value2>...
# H2 : jdbc:h2:<file>
# Hsql : jdbc:hsqldb:file:<file>
# Google Cloud SQL* : jdbc:google:mysql://<project-id>:<instance-name>/<database>
# MariaDB : jdbc:mariadb://<host>:<port>/<database>?<key1>=<value1>&<key2>=<value2>...
# MySQL : jdbc:mysql://<host>:<port>/<database>?<key1>=<value1>&<key2>=<value2>...
# Oracle* : jdbc:oracle:thin:@//<host>:<port>/<service>
# Phoenix* : jdbc:phoenix:<host>
# PostgreSQL : jdbc:postgresql://<host>:<port>/<database>?<key1>=<value1>&<key2>=<value2>...
# Redshift : jdbc:postgresql://<host>:<port>/<database>?<key1>=<value1>&<key2>=<value2>...
# SAP HANA* : jdbc:sap://<host>:<port>/<database>
# solidDB* : jdbc:solid://<host>:<port>?<key1>=<value1>&<key2>=<value2>...
# SQL Azure* : jdbc:sqlserver://<servername>.database.windows.net;databaseName=<database>
# SQL Server : jdbc:jtds:sqlserver://<host>:<port>/<database>
# SQLite : jdbc:sqlite:<database>
# Sybase ASE : jdbc:jtds:sybase://<host>:<port>/<database>
# Vertica* : jdbc:vertica://<host>:<port>/<database>
flyway.url=

# Fully qualified classname of the jdbc driver (autodetected by default based on flyway.url)
# flyway.driver=

# User to use to connect to the database (default: <<null>>)
flyway.user=
# User to use to connect to the database. Flyway will prompt you to enter it if not specified.
# flyway.user=

# Password to use to connect to the database (default: <<null>>)
flyway.password=
# Password to use to connect to the database. Flyway will prompt you to enter it if not specified.
# flyway.password=

# Comma-separated list of schemas managed by Flyway. These schema names are case-sensitive.
# (default: The default schema for the datasource connection)
Expand All @@ -66,14 +71,23 @@ flyway.password=
# Comma-separated list of fully qualified class names of custom MigrationResolver to use for resolving migrations.
# flyway.resolvers=

# If set to true, default built-in resolvers (jdbc, spring-jdbc and sql) are skipped and only custom resolvers as
# defined by 'flyway.resolvers' are used. (default: false)
# flyway.skipDefaultResolvers=

# Comma-separated list of directories containing JDBC drivers and Java-based migrations. (default: <INSTALL-DIR>/jars)
# flyway.jarDirs=

# File name prefix for Sql migrations (default: V )
# File name prefix for sql migrations (default: V )
# Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix ,
# which using the defaults translates to V1_1__My_description.sql
# flyway.sqlMigrationPrefix=

# File name prefix for repeatable sql migrations (default: R )
# Repeatable sql migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix ,
# which using the defaults translates to R__My_description.sql
# flyway.repeatableSqlMigrationPrefix=

# File name separator for Sql migrations (default: __)
# Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix ,
# which using the defaults translates to V1_1__My_description.sql
Expand Down Expand Up @@ -115,6 +129,10 @@ flyway.password=
# Warning ! Do not enable in production !
# flyway.cleanOnValidationError=

# Whether to disabled clean. (default: false)
# This is especially useful for production environments where running clean can be quite a career limiting move.
# flyway.cleanDisabled=

# The version to tag an existing schema with when executing baseline. (default: 1)
# flyway.baselineVersion=

Expand All @@ -137,3 +155,33 @@ flyway.password=
# This allows you to tie in custom code and logic to the Flyway lifecycle notifications (default: empty).
# Set this to a comma-separated list of fully qualified FlywayCallback class name implementations
# flyway.callbacks=

# If set to true, default built-in callbacks (sql) are skipped and only custom callback as
# defined by 'flyway.callbacks' are used. (default: false)
# flyway.skipDefaultCallbacks=

# Ignore missing migrations when reading the metadata table. These are migrations that were performed by an
# older deployment of the application that are no longer available in this version. For example: we have migrations
# available on the classpath with versions 1.0 and 3.0. The metadata table indicates that a migration with version 2.0
# (unknown to us) has also been applied. Instead of bombing out (fail fast) with an exception, a
# warning is logged and Flyway continues normally. This is useful for situations where one must be able to deploy
# a newer version of the application even though it doesn't contain migrations included with an older one anymore.
# true to continue normally and log a warning, false to fail fast with an exception.
# flyway.ignoreMissingMigrations=

# Ignore future migrations when reading the metadata table. These are migrations that were performed by a
# newer deployment of the application that are not yet available in this version. For example: we have migrations
# available on the classpath up to version 3.0. The metadata table indicates that a migration to version 4.0
# (unknown to us) has already been applied. Instead of bombing out (fail fast) with an exception, a
# warning is logged and Flyway continues normally. This is useful for situations where one must be able to redeploy
# an older version of the application after the database has been migrated by a newer one.
# true to continue normally and log a warning, false to fail fast with an exception. (default: true)
# flyway.ignoreFutureMigrations=

# Whether to allow mixing transactional and non-transactional statements within the same migration.
# true if mixed migrations should be allowed. false if an error should be thrown instead. (default: false)
# flyway.allowMixedMigrations=

# The username that will be recorded in the metadata table as having applied the migration.
# <<blank>> for the current database user of the connection. (default: <<blank>>).
# flyway.installedBy=
Binary file not shown.
Binary file not shown.
Binary file added flyway-4.1.2/drivers/h2-1.4.193.jar
Binary file not shown.
Binary file added flyway-4.1.2/drivers/hsqldb-2.3.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 11 additions & 4 deletions flyway-3.2.1/flyway → flyway-4.1.2/flyway
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
# limitations under the License.
#

# Save current directory
# Detect cygwin
cygwin=false
linux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
CYGWIN*|MINGW*) cygwin=true;;
Linux*) linux=true;;
esac

# resolve links - $0 may be a softlink
Expand All @@ -34,7 +36,7 @@ while [ -h "$PRG" ] ; do
fi
done

# Set the current directory to the installation directory
# Detect the installation directory
INSTALLDIR=`dirname "$PRG"`

if [ -x "$INSTALLDIR/jre/bin/java" ]; then
Expand All @@ -48,13 +50,18 @@ else
fi
fi

JAVA_ARGS=
CP="$INSTALLDIR/lib/*:$INSTALLDIR/drivers/*"

if $linux; then
JAVA_ARGS=-Djava.security.egd=file:/dev/../dev/urandom
fi

if $cygwin; then
CP=$(cygpath -pw "$CP")
fi

"$JAVA_CMD" -cp "$CP" org.flywaydb.commandline.Main "$@"
"$JAVA_CMD" $JAVA_ARGS -cp "$CP" org.flywaydb.commandline.Main "$@"

# Exit using the same code returned from Java
exit $?
Loading