chore: database prepare error message

This commit is contained in:
Chareice 2024-05-27 11:37:49 +08:00
parent 3851d49469
commit b576670826
No known key found for this signature in database

View File

@ -850,11 +850,9 @@ export class Database extends EventEmitter implements AsyncEmitter {
const result = await this.sequelize.query(`SHOW VARIABLES LIKE 'lower_case_table_names'`, { plain: true }); const result = await this.sequelize.query(`SHOW VARIABLES LIKE 'lower_case_table_names'`, { plain: true });
if (result?.Value === '1' && !this.options.underscored) { if (result?.Value === '1' && !this.options.underscored) {
console.log( throw new Error(
`Your database lower_case_table_names=1, please add ${chalk.yellow('DB_UNDERSCORED=true')} to the .env file`, `Your database lower_case_table_names=1, please add ${chalk.yellow('DB_UNDERSCORED=true')} to the .env file`,
); );
process.exit();
} }
} }