Added a setting to enable destructive delete, disabled by default must enable it in the DB for now not in the settings DB 1.0.0 has been reached

This commit is contained in:
johnnyq
2024-01-06 16:05:28 -05:00
parent e260cbf626
commit 0948fd4dc6
9 changed files with 30 additions and 4 deletions

View File

@@ -1532,14 +1532,22 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'");
}
if (CURRENT_DATABASE_VERSION == '0.9.9') {
//Insert queries here required to update to DB version 1.0.0
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_destructive_deletes_enable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_timezone`");
//Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.0'");
}
// Be sure to change database_version.php to reflect the version you are updating to here
// Please add this same comment block to the bottom of this file, and update the version number.
// Uncomment Below Lines, to add additional database updates
//
// if (CURRENT_DATABASE_VERSION == '0.9.9') {
// // Insert queries here required to update to DB version 0.10.0
// if (CURRENT_DATABASE_VERSION == '1.0.0') {
// // Insert queries here required to update to DB version 1.0.1
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.10.0'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.1'");
// }
} else {