Update better-sqlite3 and remove FTS optimization
This commit is contained in:
parent
77b799c7b0
commit
f3eee779a0
11 changed files with 39 additions and 141 deletions
30
ts/sql/migrations/930-fts5-secure-delete.ts
Normal file
30
ts/sql/migrations/930-fts5-secure-delete.ts
Normal 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!');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue