不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit 52a675a5 by Sushant Committed by Jan Aagaard Meier

#5520, throw error when no dialect supplied

1 parent 730ad7ed
Showing with 5 additions and 1 deletions
......@@ -149,7 +149,7 @@ var Sequelize = function(database, username, password, options) {
Sequelize.runHooks('beforeInit', config, options);
this.options = Utils._.extend({
dialect: 'mysql',
dialect: null,
dialectModulePath: null,
host: 'localhost',
protocol: 'tcp',
......@@ -173,6 +173,10 @@ var Sequelize = function(database, username, password, options) {
benchmark: false
}, options || {});
if (!this.options.dialect) {
throw new Error('Dialect needs to be explicitly supplied as of v4.0.0');
}
if (this.options.dialect === 'postgresql') {
this.options.dialect = 'postgres';
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!