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

Issue using with Postgres 9.3beta2 #4368

Closed
bringking opened this Issue Aug 21, 2015 · 4 comments

Comments

3 participants
@bringking

bringking commented Aug 21, 2015

I am receiving the following error when I try and sync the models--

Unhandled rejection TypeError: Invalid Version: 9.3beta2
    at new SemVer (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/semver/semver.js:293:11)
    at compare (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/semver/semver.js:569:10)
    at Function.gte (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/semver/semver.js:618:10)
    at /Users/charlesking/insights-admin/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:101:64
    at Object.tapHandler (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/finally.js:64:23)
    at Object.tryCatcher (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/charlesking/insights-admin/node_modules/sequelize/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

@mickhansen

This comment has been minimized.

Contributor

mickhansen commented Aug 23, 2015

@janmeier semver would expect -beta2 in this case, we probably can't expect semver to be able to handle all database versions.

@mickhansen

This comment has been minimized.

Contributor

mickhansen commented Aug 23, 2015

In cases where we can't detect the version we should probably silently fail and just set null.

@janmeier

This comment has been minimized.

Member

janmeier commented Aug 24, 2015

Hmm, but which version should we asume the user has if the semver check fails?

Perhaps we should do an if semver.valid check here, and throw an error telling users to set databaseVersion manually if that fails?

@mickhansen

This comment has been minimized.

Contributor

mickhansen commented Aug 24, 2015

@janmeier latest version, currently that'd be 9.2
I don't like the idea of forcing people to maintain a databaseVersion if they don't really care.

@janmeier janmeier closed this in fd426d7 Aug 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment