added integrity check button into advanced options.

This commit is contained in:
zadam
2022-02-01 21:22:43 +01:00
parent 61aa029582
commit 398376108d
5 changed files with 41 additions and 11 deletions

View File

@@ -22,6 +22,16 @@ function vacuumDatabase() {
log.info("Database has been vacuumed.");
}
function checkIntegrity() {
const results = sql.getRows("PRAGMA integrity_check");
log.info("Integrity check result: " + JSON.stringify(results));
return {
results
};
}
function findAndFixConsistencyIssues() {
consistencyChecksService.runOnDemandChecks(true);
}
@@ -30,5 +40,6 @@ module.exports = {
backupDatabase,
vacuumDatabase,
findAndFixConsistencyIssues,
anonymize
anonymize,
checkIntegrity
};