2

I am constantly running into errors where it is yelling at me to mention dialect explicitely. I am trying to talk to 2 databases and am using sequelize to perform migrations. I am using msSQL and mySQL.

Looking at other suggestions and blogs : I have tried adding dialect explicitly in database configs. I have tried adding NODE_ENV = 'development'. I have tried passing Dialect explicitly in Sequelize instances.

username: global.config.dbMssqlUsername,
    password: global.config.dbMssqlPassword,
    database: global.config.dbMssqlName,
    host: global.config.dbMssqlHostname,
    timezone: 'America/New_York',
    dialect: 'mssql',
    operatorsAliases: false,
    pool: {
      max: 5,
      min: 0,
      acquire: 30000,
      idle: 10000
    }
username: global.config.dbMysqlUsername,
    password: global.config.dbMysqlPassword,
    database: global.config.dbMysqlName,
    host: global.config.dbMysqlHostname,
    timezone: 'America/New_York',
    dialect: 'mysql',
    operatorsAliases: false,
    pool: {
      max: 5,
      min: 0,
      acquire: 30000,
      idle: 10000
    }

On console logging this DB object: I see mysqlDialect and also mssqlDialect. So it looks like it is creating it.

Also, I am following this guide : https://medium.com/unetiq/using-multiple-databases-with-nodejs-and-sequelize-59e0abcbbe6f

But it doesn't seem to be working when trying to add models stage.

I am still getting ERROR: Dialect needs to be explicitly supplied as of v4.0.0 !!

anzie001
  • 231
  • 3
  • 12

0 Answers0