Update better-sqlite3 and remove FTS optimization

This commit is contained in:
Fedor Indutny 2023-09-01 00:33:31 +02:00 committed by GitHub
parent 77b799c7b0
commit f3eee779a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 141 deletions

View file

@ -0,0 +1,30 @@
// 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 = 930;
export function updateToSchemaVersion930(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 930) {
return;
}
db.transaction(() => {
db.exec(`
INSERT INTO messages_fts
(messages_fts, rank)
VALUES
('secure-delete', 1);
`);
db.pragma('user_version = 930');
})();
logger.info('updateToSchemaVersion930: success!');
}