Postgres和Sequelize – 无法读取未定义的属性“名称”

我正在尝试在一个正在MySQL上运行良好的项目更改数据库到Postgres。
运行迁移时(收到sync和sequelize db:migrate),我收到以下错误消息。

/myProject/node_modules/pg/lib/connection.js:109 self.emit(msg.name, msg); ^ TypeError: Cannot read property 'name' of undefined at Socket.<anonymous> (/myProject/node_modules/pg/lib/connection.js:109:20) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:172:18) at Socket.Readable.push (_stream_readable.js:130:10) at TCP.onread (net.js:542:20) 

我只隔离了这个简单的模型,但是我仍然得到错误

 module.exports = (sequelize, DataTypes) => { var User = sequelize.define('User', { email: { type: DataTypes.STRING, validate: { isEmail: true } }, googleId: { type: DataTypes.STRING, allowNull: false } }, { underscored: true }) return User } 

可能是什么问题呢?

我不得不改变连接string,现在它工作。 谢谢。

 var sequelize = new Sequelize(match[5], match[1], match[2], { dialect: 'postgres', protocol: 'postgres', port: match[4], host: match[3], logging: false, dialectOptions: { ssl: true } })