mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Force attribute not required in database object.
This commit is contained in:
parent
cf713b2c58
commit
230a8af1f7
@ -27,7 +27,7 @@ module.exports = (scope, success, error) => {
|
||||
};
|
||||
|
||||
if (tables.rows && tables.rows.length !== 0) {
|
||||
if (scope.database.options.force) {
|
||||
if (scope.dbforce) {
|
||||
next();
|
||||
} 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.');
|
||||
|
||||
@ -54,7 +54,7 @@ module.exports = function (name, cliArguments) {
|
||||
return process.exit(1);
|
||||
}
|
||||
|
||||
const dbforce = cliArguments.dbforce !== undefined;
|
||||
scope.dbforce = cliArguments.dbforce !== undefined;
|
||||
|
||||
scope.database = {
|
||||
settings: {
|
||||
@ -67,8 +67,7 @@ module.exports = function (name, cliArguments) {
|
||||
},
|
||||
options: {
|
||||
authenticationDatabase: cliArguments.dbauth,
|
||||
ssl: cliArguments.dbssl,
|
||||
force: dbforce
|
||||
ssl: cliArguments.dbssl
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user