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

Commit ae289a7b by Jan Aagaard Meier

Merge pull request #680 from durango/noport

Default ports are now declared in the ConnectorManager.
2 parents 6a36ca11 7199ff80
...@@ -12,6 +12,7 @@ module.exports = (function() { ...@@ -12,6 +12,7 @@ module.exports = (function() {
this.sequelize = sequelize this.sequelize = sequelize
this.client = null this.client = null
this.config = config || {} this.config = config || {}
this.config.port = this.config.port || 3306
this.disconnectTimeoutId = null this.disconnectTimeoutId = null
this.queue = [] this.queue = []
this.activeQueue = [] this.activeQueue = []
......
...@@ -6,6 +6,7 @@ module.exports = (function() { ...@@ -6,6 +6,7 @@ module.exports = (function() {
this.sequelize = sequelize this.sequelize = sequelize
this.client = null this.client = null
this.config = config || {} this.config = config || {}
this.config.port = this.config.port || 5432
this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0)) this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0))
this.pg = this.config.native ? require('pg').native : require('pg') this.pg = this.config.native ? require('pg').native : require('pg')
......
...@@ -69,7 +69,6 @@ module.exports = (function() { ...@@ -69,7 +69,6 @@ module.exports = (function() {
this.options = Utils._.extend({ this.options = Utils._.extend({
dialect: 'mysql', dialect: 'mysql',
host: 'localhost', host: 'localhost',
port: 3306,
protocol: 'tcp', protocol: 'tcp',
define: {}, define: {},
query: {}, query: {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!