mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 12:23:31 +01:00
Ignore delivery receipts for outgoing reactions
This commit is contained in:
32
ts/sql/migrations/980-reaction-timestamp.ts
Normal file
32
ts/sql/migrations/980-reaction-timestamp.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// 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 = 980;
|
||||
|
||||
export function updateToSchemaVersion980(
|
||||
currentVersion: number,
|
||||
db: Database,
|
||||
logger: LoggerType
|
||||
): void {
|
||||
if (currentVersion >= 980) {
|
||||
return;
|
||||
}
|
||||
|
||||
db.transaction(() => {
|
||||
db.exec(`
|
||||
ALTER TABLE reactions ADD COLUMN timestamp NUMBER;
|
||||
|
||||
CREATE INDEX reactions_byTimestamp
|
||||
ON reactions
|
||||
(fromId, timestamp);
|
||||
`);
|
||||
})();
|
||||
|
||||
db.pragma('user_version = 980');
|
||||
|
||||
logger.info('updateToSchemaVersion980: success!');
|
||||
}
|
||||
Reference in New Issue
Block a user