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

Commit 6698a262 by 변상필

Support postgreSQL 'postgresql://' scheme.

1 parent 06750051
Showing with 13 additions and 0 deletions
...@@ -97,6 +97,10 @@ module.exports = (function() { ...@@ -97,6 +97,10 @@ module.exports = (function() {
language: 'en' language: 'en'
}, options || {}) }, options || {})
if (this.options.dialect === 'postgresql') {
this.options.dialect = 'postgres'
}
if (this.options.logging === true) { if (this.options.logging === true) {
console.log('DEPRECATION WARNING: The logging-option should be either a function or false. Default: console.log') console.log('DEPRECATION WARNING: The logging-option should be either a function or false. Default: console.log')
this.options.logging = console.log this.options.logging = console.log
......
...@@ -52,6 +52,15 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () { ...@@ -52,6 +52,15 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
var sequelize = new Sequelize('sqlite://test.sqlite/lol?reconnect=true') var sequelize = new Sequelize('sqlite://test.sqlite/lol?reconnect=true')
}) })
} }
if (dialect === 'postgres') {
it('should work with connection strings (1)', function () {
var sequelize = new Sequelize('postgres://localhost/sequelize_test')
})
it('should work with connection strings (2)', function () {
var sequelize = new Sequelize('postgresql://localhost/sequelize_test')
})
}
}) })
if (dialect !== 'sqlite') { if (dialect !== 'sqlite') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!