brianschardt / node_rest_api_mysql

MIT License
248 stars 140 forks source link

ERROR: Dialect needs to be explicitly supplied as of v4.0.0 #5

Closed erniealega closed 6 years ago

erniealega commented 6 years ago

Hi Brian,

I encountered an error as stated in the subject line.

In my local copy, I added the following entries in the config.js (after the global declarations)

module.exports = { development: { username: 'whatsmyname', password: 'whatsmypassword', database: 'whatsmydb', host: '127.0.0.1', dialect: 'mysql' }, test: { username: 'whatsmyname', password: 'whatsmypassword', database: 'whatsmydb', host: '127.0.0.1', dialect: 'mysql' }, production: { username: process.env.DB_USER, password: process.env.DB_PASSWORD, database: process.env.DB_NAME, host: process.env.DB_HOST, dialect: 'mysql' } };

Kindly confirm if this is a good approach or if you have any other suggestions. But, for now, this addition helped me run the migration flawlessly.

BTW, I like the architecture ;)

Thanks

brianschardt commented 6 years ago

I do not think it will work with the new refactor