Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 52a675a5
authored
Mar 28, 2016
by
Sushant
Committed by
Jan Aagaard Meier
May 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5520, throw error when no dialect supplied
1 parent
730ad7ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
lib/sequelize.js
lib/sequelize.js
View file @
52a675a
...
@@ -149,7 +149,7 @@ var Sequelize = function(database, username, password, options) {
...
@@ -149,7 +149,7 @@ var Sequelize = function(database, username, password, options) {
Sequelize
.
runHooks
(
'beforeInit'
,
config
,
options
);
Sequelize
.
runHooks
(
'beforeInit'
,
config
,
options
);
this
.
options
=
Utils
.
_
.
extend
({
this
.
options
=
Utils
.
_
.
extend
({
dialect
:
'mysql'
,
dialect
:
null
,
dialectModulePath
:
null
,
dialectModulePath
:
null
,
host
:
'localhost'
,
host
:
'localhost'
,
protocol
:
'tcp'
,
protocol
:
'tcp'
,
...
@@ -173,6 +173,10 @@ var Sequelize = function(database, username, password, options) {
...
@@ -173,6 +173,10 @@ var Sequelize = function(database, username, password, options) {
benchmark
:
false
benchmark
:
false
},
options
||
{});
},
options
||
{});
if
(
!
this
.
options
.
dialect
)
{
throw
new
Error
(
'Dialect needs to be explicitly supplied as of v4.0.0'
);
}
if
(
this
.
options
.
dialect
===
'postgresql'
)
{
if
(
this
.
options
.
dialect
===
'postgresql'
)
{
this
.
options
.
dialect
=
'postgres'
;
this
.
options
.
dialect
=
'postgres'
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment