diff --git a/.gitignore b/.gitignore
index b785247..071d9a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
node_modules
npm-debug.log
tmp
+.DS_Store
\ No newline at end of file
diff --git a/README.md b/README.md
index 56757ec..76d7b48 100644
--- a/README.md
+++ b/README.md
@@ -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
@@ -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.
The schemas will be cleaned in the order of this list.|
-|jarDir|no|``/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.
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.|
-|jarDir|no|``/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.
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:``/sql|Comma-separated list of 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 and may only contain sql migrations.|
-|jarDir|no|``/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".
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.
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.
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.
**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.
This is useful for initial Flyway production deployments on projects with an existing DB.
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.
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:``/sql|Comma-separated list of 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 and may only contain sql migrations.|
-|jarDir|no|``/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".
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.
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.
**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
@@ -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
diff --git a/flyway-3.2.1/drivers/h2-1.3.170.jar b/flyway-3.2.1/drivers/h2-1.3.170.jar
deleted file mode 100644
index 869798e..0000000
Binary files a/flyway-3.2.1/drivers/h2-1.3.170.jar and /dev/null differ
diff --git a/flyway-3.2.1/drivers/hsqldb-2.3.2.jar b/flyway-3.2.1/drivers/hsqldb-2.3.2.jar
deleted file mode 100644
index f931a45..0000000
Binary files a/flyway-3.2.1/drivers/hsqldb-2.3.2.jar and /dev/null differ
diff --git a/flyway-3.2.1/drivers/jna-3.3.0-platform.jar b/flyway-3.2.1/drivers/jna-3.3.0-platform.jar
deleted file mode 100644
index 2dd530d..0000000
Binary files a/flyway-3.2.1/drivers/jna-3.3.0-platform.jar and /dev/null differ
diff --git a/flyway-3.2.1/drivers/jna-3.3.0.jar b/flyway-3.2.1/drivers/jna-3.3.0.jar
deleted file mode 100644
index 57f31c3..0000000
Binary files a/flyway-3.2.1/drivers/jna-3.3.0.jar and /dev/null differ
diff --git a/flyway-3.2.1/drivers/mariadb-java-client-1.1.7.jar b/flyway-3.2.1/drivers/mariadb-java-client-1.1.7.jar
deleted file mode 100644
index 765f957..0000000
Binary files a/flyway-3.2.1/drivers/mariadb-java-client-1.1.7.jar and /dev/null differ
diff --git a/flyway-3.2.1/drivers/postgresql-9.3-1102-jdbc4.jar b/flyway-3.2.1/drivers/postgresql-9.3-1102-jdbc4.jar
deleted file mode 100644
index 4542476..0000000
Binary files a/flyway-3.2.1/drivers/postgresql-9.3-1102-jdbc4.jar and /dev/null differ
diff --git a/flyway-3.2.1/lib/flyway-commandline-3.2.1.jar b/flyway-3.2.1/lib/flyway-commandline-3.2.1.jar
deleted file mode 100644
index da50cc7..0000000
Binary files a/flyway-3.2.1/lib/flyway-commandline-3.2.1.jar and /dev/null differ
diff --git a/flyway-3.2.1/lib/flyway-core-3.2.1.jar b/flyway-3.2.1/lib/flyway-core-3.2.1.jar
deleted file mode 100644
index b833f3b..0000000
Binary files a/flyway-3.2.1/lib/flyway-core-3.2.1.jar and /dev/null differ
diff --git a/flyway-3.2.1/LICENSE.txt b/flyway-4.1.2/LICENSE.txt
similarity index 93%
rename from flyway-3.2.1/LICENSE.txt
rename to flyway-4.1.2/LICENSE.txt
index 9a785c0..e6f6e62 100644
--- a/flyway-3.2.1/LICENSE.txt
+++ b/flyway-4.1.2/LICENSE.txt
@@ -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.
diff --git a/flyway-3.2.1/LICENSES-THIRD-PARTY.txt b/flyway-4.1.2/LICENSES-THIRD-PARTY.txt
similarity index 99%
rename from flyway-3.2.1/LICENSES-THIRD-PARTY.txt
rename to flyway-4.1.2/LICENSES-THIRD-PARTY.txt
index 12318c8..ce6e503 100644
--- a/flyway-3.2.1/LICENSES-THIRD-PARTY.txt
+++ b/flyway-4.1.2/LICENSES-THIRD-PARTY.txt
@@ -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
@@ -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/
@@ -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/
@@ -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/
@@ -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/
@@ -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
diff --git a/flyway-3.2.1/README.txt b/flyway-4.1.2/README.txt
similarity index 87%
rename from flyway-3.2.1/README.txt
rename to flyway-4.1.2/README.txt
index eb028b2..428953a 100644
--- a/flyway-3.2.1/README.txt
+++ b/flyway-4.1.2/README.txt
@@ -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.
diff --git a/flyway-3.2.1/conf/flyway.conf b/flyway-4.1.2/conf/flyway.conf
similarity index 65%
rename from flyway-3.2.1/conf/flyway.conf
rename to flyway-4.1.2/conf/flyway.conf
index 76f8f9b..c97b833 100644
--- a/flyway-3.2.1/conf/flyway.conf
+++ b/flyway-4.1.2/conf/flyway.conf
@@ -21,28 +21,33 @@
# * = driver must be downloaded and installed in /drivers manually
# DB2* : jdbc:db2://:/
# Derby : jdbc:derby:<;attribute=value>
+# EnterpriseDB : jdbc:edb://:/?=&=...
# H2 : jdbc:h2:
# Hsql : jdbc:hsqldb:file:
# Google Cloud SQL* : jdbc:google:mysql://:/
# MariaDB : jdbc:mariadb://:/?=&=...
# MySQL : jdbc:mysql://:/?=&=...
# Oracle* : jdbc:oracle:thin:@//:/
+# Phoenix* : jdbc:phoenix:
# PostgreSQL : jdbc:postgresql://:/?=&=...
+# Redshift : jdbc:postgresql://:/?=&=...
+# SAP HANA* : jdbc:sap://:/
# solidDB* : jdbc:solid://:?=&=...
# SQL Azure* : jdbc:sqlserver://.database.windows.net;databaseName=
# SQL Server : jdbc:jtds:sqlserver://:/
# SQLite : jdbc:sqlite:
+# Sybase ASE : jdbc:jtds:sybase://:/
# Vertica* : jdbc:vertica://:/
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: <>)
-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: <>)
-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)
@@ -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: /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
@@ -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=
@@ -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.
+# <> for the current database user of the connection. (default: <>).
+# flyway.installedBy=
diff --git a/flyway-3.2.1/drivers/derby-10.11.1.1.jar b/flyway-4.1.2/drivers/derby-10.12.1.1.jar
similarity index 68%
rename from flyway-3.2.1/drivers/derby-10.11.1.1.jar
rename to flyway-4.1.2/drivers/derby-10.12.1.1.jar
index f01ce42..5841555 100644
Binary files a/flyway-3.2.1/drivers/derby-10.11.1.1.jar and b/flyway-4.1.2/drivers/derby-10.12.1.1.jar differ
diff --git a/flyway-3.2.1/drivers/derbyclient-10.11.1.1.jar b/flyway-4.1.2/drivers/derbyclient-10.12.1.1.jar
similarity index 59%
rename from flyway-3.2.1/drivers/derbyclient-10.11.1.1.jar
rename to flyway-4.1.2/drivers/derbyclient-10.12.1.1.jar
index fd8eed6..f9bf5b9 100644
Binary files a/flyway-3.2.1/drivers/derbyclient-10.11.1.1.jar and b/flyway-4.1.2/drivers/derbyclient-10.12.1.1.jar differ
diff --git a/flyway-4.1.2/drivers/h2-1.4.193.jar b/flyway-4.1.2/drivers/h2-1.4.193.jar
new file mode 100644
index 0000000..6d7baf5
Binary files /dev/null and b/flyway-4.1.2/drivers/h2-1.4.193.jar differ
diff --git a/flyway-4.1.2/drivers/hsqldb-2.3.4.jar b/flyway-4.1.2/drivers/hsqldb-2.3.4.jar
new file mode 100644
index 0000000..71d39c3
Binary files /dev/null and b/flyway-4.1.2/drivers/hsqldb-2.3.4.jar differ
diff --git a/flyway-3.2.1/drivers/jtds-1.3.1.jar b/flyway-4.1.2/drivers/jtds-1.3.1.jar
similarity index 100%
rename from flyway-3.2.1/drivers/jtds-1.3.1.jar
rename to flyway-4.1.2/drivers/jtds-1.3.1.jar
diff --git a/flyway-4.1.2/drivers/mariadb-java-client-1.4.5.jar b/flyway-4.1.2/drivers/mariadb-java-client-1.4.5.jar
new file mode 100644
index 0000000..6182ddb
Binary files /dev/null and b/flyway-4.1.2/drivers/mariadb-java-client-1.4.5.jar differ
diff --git a/flyway-4.1.2/drivers/postgresql-9.4.1208.jre6.jar b/flyway-4.1.2/drivers/postgresql-9.4.1208.jre6.jar
new file mode 100644
index 0000000..9718d6e
Binary files /dev/null and b/flyway-4.1.2/drivers/postgresql-9.4.1208.jre6.jar differ
diff --git a/flyway-3.2.1/drivers/put-your-jdbc-drivers-here.txt b/flyway-4.1.2/drivers/put-your-jdbc-drivers-here.txt
similarity index 100%
rename from flyway-3.2.1/drivers/put-your-jdbc-drivers-here.txt
rename to flyway-4.1.2/drivers/put-your-jdbc-drivers-here.txt
diff --git a/flyway-3.2.1/drivers/sqlite-jdbc-3.7.15-M1.jar b/flyway-4.1.2/drivers/sqlite-jdbc-3.7.15-M1.jar
similarity index 100%
rename from flyway-3.2.1/drivers/sqlite-jdbc-3.7.15-M1.jar
rename to flyway-4.1.2/drivers/sqlite-jdbc-3.7.15-M1.jar
diff --git a/flyway-3.2.1/flyway b/flyway-4.1.2/flyway
similarity index 82%
rename from flyway-3.2.1/flyway
rename to flyway-4.1.2/flyway
index 215368c..eb84109 100755
--- a/flyway-3.2.1/flyway
+++ b/flyway-4.1.2/flyway
@@ -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
@@ -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
@@ -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 $?
diff --git a/flyway-3.2.1/flyway.cmd b/flyway-4.1.2/flyway.cmd
similarity index 88%
rename from flyway-3.2.1/flyway.cmd
rename to flyway-4.1.2/flyway.cmd
index 206f28c..b4327df 100644
--- a/flyway-3.2.1/flyway.cmd
+++ b/flyway-4.1.2/flyway.cmd
@@ -1,5 +1,5 @@
@REM
-@REM Copyright 2010-2015 Axel Fontaine
+@REM Copyright 2010-2017 Boxfuse GmbH
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ setlocal
@REM Set the current directory to the installation directory
set INSTALLDIR=%~dp0
-if exist %INSTALLDIR%\jre\bin\java.exe (
- set JAVA_CMD=%INSTALLDIR%\jre\bin\java.exe
+if exist "%INSTALLDIR%\jre\bin\java.exe" (
+ set JAVA_CMD="%INSTALLDIR%\jre\bin\java.exe"
) else (
@REM Use JAVA_HOME if it is set
if "%JAVA_HOME%"=="" (
diff --git a/flyway-3.2.1/jars/put-your-java-migration-jars-here.txt b/flyway-4.1.2/jars/put-your-java-migration-jars-here.txt
similarity index 100%
rename from flyway-3.2.1/jars/put-your-java-migration-jars-here.txt
rename to flyway-4.1.2/jars/put-your-java-migration-jars-here.txt
diff --git a/flyway-4.1.2/lib/flyway-commandline-4.1.2.jar b/flyway-4.1.2/lib/flyway-commandline-4.1.2.jar
new file mode 100644
index 0000000..216ef20
Binary files /dev/null and b/flyway-4.1.2/lib/flyway-commandline-4.1.2.jar differ
diff --git a/flyway-4.1.2/lib/flyway-core-4.1.2.jar b/flyway-4.1.2/lib/flyway-core-4.1.2.jar
new file mode 100644
index 0000000..af5d85c
Binary files /dev/null and b/flyway-4.1.2/lib/flyway-core-4.1.2.jar differ
diff --git a/flyway-3.2.1/sql/put-your-sql-migrations-here.txt b/flyway-4.1.2/sql/put-your-sql-migrations-here.txt
similarity index 100%
rename from flyway-3.2.1/sql/put-your-sql-migrations-here.txt
rename to flyway-4.1.2/sql/put-your-sql-migrations-here.txt
diff --git a/package.json b/package.json
index b49d509..48697eb 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-flyway",
"description": "Run Flyway database migration tool.",
- "version": "0.3.2",
+ "version": "0.4.1",
"homepage": "https://github.com/gomoob/grunt-flyway",
"author": {
"name": "Baptiste Gaillard",
diff --git a/tasks/flyway.js b/tasks/flyway.js
index 0351346..21ba3bb 100644
--- a/tasks/flyway.js
+++ b/tasks/flyway.js
@@ -25,7 +25,7 @@ module.exports = function(grunt) {
var done = this.async();
// Path to the Flyway Command Line 'bin' directory
- var flywayBinPath = Path.resolve(__dirname, '../flyway-3.2.1/lib');
+ var flywayBinPath = Path.resolve(__dirname, '../flyway-4.1.2/lib');
// Windows CLASSPATH separator
var classPathSeparator = ';';
@@ -38,8 +38,8 @@ module.exports = function(grunt) {
}
// Creates the Java CLASSPATH used to run Flyway
- var javaClasspath = flywayBinPath + '/flyway-commandline-3.2.1.jar' + classPathSeparator;
- javaClasspath = javaClasspath + flywayBinPath + '/flyway-core-3.2.1.jar';
+ var javaClasspath = flywayBinPath + '/flyway-commandline-4.1.2.jar' + classPathSeparator;
+ javaClasspath = javaClasspath + flywayBinPath + '/flyway-core-4.1.2.jar';
// Object used to configure the Flyway Commands which are available with the Grunt Flyway Plugin
// Currently available commands are :
@@ -59,7 +59,9 @@ module.exports = function(grunt) {
password: {},
schemas: {},
jarDirs: {},
- callbacks: {}
+ callbacks: {},
+ skipDefaultCallbacks: {},
+ cleanDisabled: {}
},
baseline: {
url: {
@@ -72,6 +74,7 @@ module.exports = function(grunt) {
table: {},
jarDirs: {},
callbacks: {},
+ skipDefaultCallbacks: {},
baselineVersion: {},
baselineDescription: {}
},
@@ -87,23 +90,32 @@ module.exports = function(grunt) {
locations: {},
jarDirs: {},
sqlMigrationPrefix: {},
+ repeatableSqlMigrationPrefix: {},
sqlMigrationSeparator: {},
sqlMigrationSuffix: {},
+ allowMixedMigrations: {},
encoding: {},
+ placeholderReplacement: {},
placeholders: {
isObject: true
},
placeholderPrefix: {},
placeholderSuffix: {},
resolvers: {},
+ skipDefaultResolvers: {},
callbacks: {},
+ skipDefaultCallbacks: {},
target: {},
outOfOrder: {},
validateOnMigrate: {},
cleanOnValidationError: {},
+ ignoreMissingMigrations: {},
+ ignoreFutureMigrations: {},
+ cleanDisabled: {},
baselineOnMigrate: {},
baselineVersion: {},
- baselineDescription: {}
+ baselineDescription: {},
+ installedBy: {}
},
repair: {
url: {
@@ -117,6 +129,7 @@ module.exports = function(grunt) {
locations: {},
jarDirs: {},
sqlMigrationPrefix: {},
+ repeatableSqlMigrationPrefix: {},
sqlMigrationSeparator: {},
sqlMigrationSuffix: {},
encoding: {},
@@ -127,7 +140,9 @@ module.exports = function(grunt) {
placeholderPrefix: {},
placeholderSuffix: {},
resolvers: {},
- callbacks: {}
+ skipDefaultResolvers: {},
+ callbacks: {},
+ skipDefaultCallbacks: {}
},
validate: {
url: {
@@ -141,6 +156,7 @@ module.exports = function(grunt) {
locations: {},
jarDirs: {},
sqlMigrationPrefix: {},
+ repeatableSqlMigrationPrefix: {},
sqlMigrationSeparator: {},
sqlMigrationSuffix: {},
encoding: {},
@@ -151,10 +167,14 @@ module.exports = function(grunt) {
placeholderPrefix: {},
placeholderSuffix: {},
resolvers: {},
+ skipDefaultResolvers: {},
callbacks: {},
+ skipDefaultCallbacks: {},
target: {},
outOfOrder: {},
- cleanOnValidationError: {}
+ cleanOnValidationError: {},
+ ignoreMissingMigrations: {},
+ ignoreFutureMigrations: {}
},
info: {
url: {
@@ -168,6 +188,7 @@ module.exports = function(grunt) {
locations: {},
jarDirs: {},
sqlMigrationPrefix: {},
+ repeatableSqlMigrationPrefix: {},
sqlMigrationSeparator: {},
sqlMigrationSuffix: {},
encoding: {},
@@ -178,7 +199,9 @@ module.exports = function(grunt) {
placeholderPrefix: {},
placeholderSuffix: {},
resolvers: {},
+ skipDefaultResolvers: {},
callbacks: {},
+ skipDefaultCallbacks: {},
target: {},
outOfOrder: {}
}
@@ -271,39 +294,14 @@ module.exports = function(grunt) {
}
- grunt.log.write(flywayCommand);
-
var childProcess = ChildProcess.exec(flywayCommand, function(error, stdout, stderr) {
grunt.log.writeln();
- grunt.log.writeln(error);
grunt.log.writeln(stdout);
- grunt.log.writeln(stderr);
-
- if(stdout.indexOf('ERROR: FlywayException: Unable to obtain Jdbc connection from DataSource') !== -1) {
-
- var databaseName = options.url.substring(options.url.lastIndexOf('/') + 1);
-
- grunt.log.writeln('The connection to your database has failed, is your connection configuration set properly?');
- grunt.log.writeln();
- grunt.log.writeln('Here are the parameters your are using to connect to your database:');
- grunt.log.writeln(' url=' + options.url);
- grunt.log.writeln(' user=' + options.user);
- grunt.log.writeln(' password=' + options.password);
-
- grunt.log.writeln();
- grunt.log.writeln('If your database connection configuration parameters are valid verify that your database exist.');
- grunt.log.writeln('To create your database you could use the following SQL script:');
- grunt.log.writeln();
- grunt.log.writeln(' -- Creates the database');
- grunt.log.writeln(' create database ' + databaseName + ' default char set UTF8;');
- grunt.log.writeln(' use ' + databaseName + ';');
- grunt.log.writeln();
- grunt.log.writeln(' -- Creates the user used to connect to the database with the right grants');
- grunt.log.writeln(' grant all privileges on ' + databaseName + '.* to \'' + options.user + '\'@\'localhost\' identified by \'' + options.password + '\';');
- grunt.log.writeln(' flush privileges;');
- grunt.log.writeln();
+ if (stderr) {
+
+ grunt.log.writeln(stderr);
}
});