Ref code:
|
console.error(`${clc.red('ERROR:')} ${message}`); |
Currently an error logs the message property of the "ERROR".
console.error(`${_cliColor2.default.red('ERROR:')} ${message}`);
In the case of an error, you get something like
SequelizeForeignKeyConstraintError: insert or update on table "my_table" violates foreign key constraint "...."
We could log the "DETAIL" similar to Postgres log_error_verbosity configuration.
console.error(`${_cliColor2.default.red('ERROR:')} ${message}`);
console.error(`${_cliColor2.default.red('DETAIL:')} ${error.original.detail}`);
This would greatly help with debugging migration issues with sequelize.
Logging more detailed output could expose security implications in the normal course of operations for an application. However, for migrations, I don't know if we have this concern. Thoughts?
What do you expect to happen?
ERROR: SequelizeForeignKeyConstraintError: insert or update on table "my_table" violates foreign key constraint "...."
DETAIL: Key (my_column)=(1) is not present in table "my_table"
What is actually happening?
ERROR: SequelizeForeignKeyConstraintError: insert or update on table "my_table" violates foreign key constraint "...."
Dialect:__ postgres (and others)
Database version: N/A
Sequelize CLI version: most recent
Sequelize version: N/A
Ref code:
cli/src/helpers/view-helper.js
Line 38 in 54ec29d
Currently an error logs the message property of the "ERROR".
In the case of an error, you get something like
We could log the "DETAIL" similar to Postgres log_error_verbosity configuration.
This would greatly help with debugging migration issues with sequelize.
Logging more detailed output could expose security implications in the normal course of operations for an application. However, for migrations, I don't know if we have this concern. Thoughts?
What do you expect to happen?
What is actually happening?
Dialect:__ postgres (and others)
Database version: N/A
Sequelize CLI version: most recent
Sequelize version: N/A