From add8d47a86588c82c39528ceb5859340a8e4d53c Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Thu, 3 May 2018 12:45:02 +0200 Subject: [PATCH] Improve the check of the database tables --- packages/strapi-bookshelf/lib/utils/connectivity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-bookshelf/lib/utils/connectivity.js b/packages/strapi-bookshelf/lib/utils/connectivity.js index 64706015bb..552c6b6868 100644 --- a/packages/strapi-bookshelf/lib/utils/connectivity.js +++ b/packages/strapi-bookshelf/lib/utils/connectivity.js @@ -32,7 +32,7 @@ module.exports = (scope, success, error) => { 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.'); inquirer.prompt([{