signal-desktop/ts/sql/migrations/940-fts5-revert.ts
2023-10-11 01:55:32 +02:00

25 lines
595 B
TypeScript

// 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 = 940;
export function updateToSchemaVersion940(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 940) {
return;
}
db.transaction(() => {
// This was a migration that disabled secure-delete and rebuilt the index
db.pragma('user_version = 940');
})();
logger.info('updateToSchemaVersion940: success!');
}