Add support for call link epochs

Co-authored-by: trevor-signal <trevor@signal.org>
This commit is contained in:
emir-signal
2025-08-07 15:12:56 -04:00
committed by GitHub
parent ee45891d35
commit ebf2892039
36 changed files with 393 additions and 86 deletions

View File

@@ -0,0 +1,16 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { type WritableDB } from '../Interface';
export default function updateToSchemaVersion1430(db: WritableDB): void {
db.exec(`
ALTER TABLE callLinks
ADD COLUMN epoch BLOB;
`);
db.exec(`
ALTER TABLE defunctCallLinks
ADD COLUMN epoch BLOB;
`);
}

View File

@@ -118,6 +118,7 @@ import updateToSchemaVersion1390 from './1390-attachment-download-keys';
import updateToSchemaVersion1400 from './1400-simplify-receipts';
import updateToSchemaVersion1410 from './1410-remove-wallpaper';
import updateToSchemaVersion1420 from './1420-backup-downloads';
import updateToSchemaVersion1430 from './1430-call-links-epoch-id';
import { DataWriter } from '../Server';
@@ -1591,6 +1592,7 @@ export const SCHEMA_VERSIONS: ReadonlyArray<SchemaUpdateType> = [
{ version: 1400, update: updateToSchemaVersion1400 },
{ version: 1410, update: updateToSchemaVersion1410 },
{ version: 1420, update: updateToSchemaVersion1420 },
{ version: 1430, update: updateToSchemaVersion1430 },
];
export class DBVersionFromFutureError extends Error {