Files
cloudron-box/migrations/20250812102445-backups-add-integrityJson.js
Girish Ramakrishnan 47fc9561ab backups (tgz): save integrity information
we generate a signing key pair for each target. Initially, I had this
as global. We needed a route to return the public key and putting it
under backup target seemed natural. Since we delete the backups when
we delete a target, we lose all the signing hashes. So, it's fine to lose
the key pair on target delete.
2025-08-12 19:00:29 +05:30

16 lines
416 B
JavaScript

'use strict';
exports.up = function(db, callback) {
db.runSql('ALTER TABLE backups ADD COLUMN integrityJson TEXT', function (error) {
if (error) console.error(error);
callback(error);
});
};
exports.down = function(db, callback) {
db.runSql('ALTER TABLE backups DROP COLUMN integrityJson', function (error) {
if (error) console.error(error);
callback(error);
});
};