signal-desktop/ts/sql/migrations/950-fts5-secure-delete.ts

26 lines
571 B
TypeScript
Raw Normal View History

2023-09-18 23:09:09 +00:00
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/better-sqlite3';
import type { LoggerType } from '../../types/Logging';
export const version = 950;
export function updateToSchemaVersion950(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 950) {
return;
}
db.transaction(() => {
2023-10-10 23:55:32 +00:00
// This was a migration that enable secure-delete
2023-09-18 23:09:09 +00:00
db.pragma('user_version = 950');
})();
logger.info('updateToSchemaVersion950: success!');
}