tgz: add fileCount to integrity

This commit is contained in:
Girish Ramakrishnan
2025-08-13 19:33:39 +05:30
parent cb1bc6cfdf
commit 0c79dcdf1b
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -71,8 +71,8 @@ async function add(data) {
const prefixId = data.type === exports.BACKUP_TYPE_APP ? `${data.type}_${data.identifier}` : data.type; // type and identifier are same for other types
const id = `${prefixId}_v${data.packageVersion}_${hat(32)}`; // id is used by the UI to derive dependent packages. making this a UUID will require a lot of db querying
const appConfigJson = data.appConfig ? JSON.stringify(data.appConfig) : null;
const statsJson = data.statsJson ? JSON.stringify(data.statsJson) : null;
const integrityJson = data.integrityJson ? JSON.stringify(data.integrityJson) : null;
const statsJson = data.stats ? JSON.stringify(data.stats) : null;
const integrityJson = data.integrity ? JSON.stringify(data.integrity) : null;
const [error] = await safe(database.query('INSERT INTO backups (id, remotePath, identifier, encryptionVersion, packageVersion, type, creationTime, state, dependsOnJson, manifestJson, preserveSecs, appConfigJson, targetId, statsJson, integrityJson) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
[ id, data.remotePath, data.identifier, data.encryptionVersion, data.packageVersion, data.type, creationTime, data.state, JSON.stringify(data.dependsOn), manifestJson, data.preserveSecs, appConfigJson, data.targetId, statsJson, integrityJson ]));