Improve the check of the database tables

This commit is contained in:
Aurelsicoko 2018-05-03 12:45:02 +02:00
parent 120e10ef65
commit add8d47a86

View File

@ -32,7 +32,7 @@ module.exports = (scope, success, error) => {
success(); success();
}; };
if (tables.rows.length !== 0) { if (tables.rows && tables.rows.length !== 0) {
logger.warn('It seems that your database is not empty. Be aware that Strapi is going to automatically creates tables & columns, and might update columns which can corrupt data or cause data loss.'); logger.warn('It seems that your database is not empty. Be aware that Strapi is going to automatically creates tables & columns, and might update columns which can corrupt data or cause data loss.');
inquirer.prompt([{ inquirer.prompt([{