Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to assert pg version correctly #52

Open
bttf opened this issue May 24, 2020 · 0 comments
Open

Fails to assert pg version correctly #52

bttf opened this issue May 24, 2020 · 0 comments

Comments

@bttf
Copy link

bttf commented May 24, 2020

Related to #32; when PG produces a version like one below, the regex matcher matches on the wrong string, causing the following error to occur:

[ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Invalid Version: 0.18.04
    at module.exports (/home/bttf/wyl-today/node_modules/db-migrate/lib/commands/helper/assert.js:9:14)
    at /home/bttf/wyl-today/node_modules/db-migrate/lib/commands/up.js:29:16
    at new SemVer (/home/bttf/wyl-today/node_modules/semver/semver.js:323:11)
    at compare (/home/bttf/wyl-today/node_modules/semver/semver.js:614:10)
    at Function.gte (/home/bttf/wyl-today/node_modules/semver/semver.js:663:10)
    at Object.<anonymous> (/home/bttf/wyl-today/node_modules/db-migrate-pg/index.js:171:43)
    at tryCatcher (/home/bttf/wyl-today/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/bttf/wyl-today/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/bttf/wyl-today/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/bttf/wyl-today/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/bttf/wyl-today/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/bttf/wyl-today/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/bttf/wyl-today/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/bttf/wyl-today/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/bttf/wyl-today/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)

Version output

pgdb=# select  version() as version;
                                                                version
----------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant