When I run db:seed:all command, it gives me this error:
Seed file failed with error: Validation error
How can I see the log of which validation that got error in Sequelize?
You can see the degub info by using the --debug
option to the command, like:
$ sequelize db:seed:all --debug
this option, and others can be found by typing:
$ sequelize db:seed:all --help
The seed log for Sequelize can be activated by setting true to the logging property of the sequelize config.js, as follow:
{
"development": {
"username": "root",
"password": null,
"logging": true,
"database": "database_development",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"logging": true,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"logging": false,
"database": "database_production",
"host": "127.0.0.1",
"dialect": "mysql"
}
}
The default configuration file can be found here: Default configuration file for sequelize.
hope this helps :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With