brianschardt / node_rest_api_mysql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

erniealega opened this issue · comments

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

I do not think it will work with the new refactor