Flyway is not following through command when version is updating
I'm running the command
flyway --configfile=db/conf/flyway.js migrate
Every time there's a new version, the migrate (or any other command) does not complete after the download finishes.
When running the command again, the migrate is completed.
As a workaround, we run flyway info before the migrate.
You can reproduce this by setting in the config file a version other than the one currently installed. E.g.:
{
"downloads": {
"expirationTimeInMs": 0
},
"version": "8.2.0"
}
(Or by deleting the content of the jlib folder)
Environment:
- OS: Windows 10
- NodeJS: 14.18.2
- node-flywaydb: 3.0.7
1st run log:
DOWNLOADING https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/8.2.0/flyway-commandline-8.2.0-windows-x64.zip
2nd run log:
A new version of Flyway is available
Upgrade to Flyway 8.2.1: https://rd.gt/2X0gakb
Flyway Community Edition 8.2.0 by Redgate
Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.17)
Successfully validated 208 migrations (execution time 00:00.177s)
Current version of schema "public": 1.200
Schema "public" is up to date. No migration necessary.
Looking at the code, it seems that you use extract-zip in the old callback-style API, which is deprecated as of version 2.0.0
https://github.com/maxogden/extract-zip/releases/tag/v2.0.0
Opened a PR https://github.com/markgardner/node-flywaydb/pull/35
Is the callback pattern causing the problem?
Right, they changed the callback api to a promise api. so the callback passed as the 3rd parameter is never called.
Any update on this?