You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: Dialect undefined does not support db:create / db:drop commands
It happens because it doesn't understand that my database settings are defended in config/datastores.js and config/env/*.js files, under sails.config.connections || sails.config.datastores variables.
Sails itself does understand it, thanks to sails-hook-sequelize, but sequelize-cli doesn't.
I can solve that problem with following hack in config/sequelize.js:
var path = require('path');
var config = require(path.resolve('config/env', process.env.NODE_ENV || 'development'));
var datastore = config.datastores.default;
module.exports = Object.assign(datastore, { charset: 'utf8' });
However I believe, it would be nice if sails-hook-sequelize supports sequelize-cli as well.
The text was updated successfully, but these errors were encountered:
I'm trying to use Sequelize CLI with sails, and then I run
sequelize db:drop
- it gives me an error:It happens because it doesn't understand that my database settings are defended in
config/datastores.js
andconfig/env/*.js
files, undersails.config.connections || sails.config.datastores
variables.Sails itself does understand it, thanks to
sails-hook-sequelize
, butsequelize-cli
doesn't.I can solve that problem with following hack in
config/sequelize.js
:However I believe, it would be nice if
sails-hook-sequelize
supportssequelize-cli
as well.The text was updated successfully, but these errors were encountered: