mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 15:19:00 +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 (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.');
|
||||||
|
|||||||
@ -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
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user