Force attribute not required in database object.

This commit is contained in:
Chaitanya Choudhary 2018-12-26 13:50:53 +05:30
parent cf713b2c58
commit 230a8af1f7
2 changed files with 3 additions and 4 deletions

View File

@ -27,7 +27,7 @@ module.exports = (scope, success, error) => {
}; };
if (tables.rows && tables.rows.length !== 0) { if (tables.rows && tables.rows.length !== 0) {
if (scope.database.options.force) { if (scope.dbforce) {
next(); next();
} else { } else {
console.log('🤔 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.'); console.log('🤔 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.');

View File

@ -54,7 +54,7 @@ module.exports = function (name, cliArguments) {
return process.exit(1); return process.exit(1);
} }
const dbforce = cliArguments.dbforce !== undefined; scope.dbforce = cliArguments.dbforce !== undefined;
scope.database = { scope.database = {
settings: { settings: {
@ -67,8 +67,7 @@ module.exports = function (name, cliArguments) {
}, },
options: { options: {
authenticationDatabase: cliArguments.dbauth, authenticationDatabase: cliArguments.dbauth,
ssl: cliArguments.dbssl, ssl: cliArguments.dbssl
force: dbforce
} }
}; };
} }