mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 11:53:23 +01:00
Introduce kyber pre key triple table
This commit is contained in:
15
ts/sql/migrations/1470-kyber-triple.ts
Normal file
15
ts/sql/migrations/1470-kyber-triple.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { WritableDB } from '../Interface.js';
|
||||
|
||||
export default function updateToSchemaVersion1460(db: WritableDB): void {
|
||||
db.exec(`
|
||||
CREATE TABLE kyberPreKey_triples (
|
||||
id TEXT NOT NULL REFERENCES kyberPreKeys(id) ON DELETE CASCADE,
|
||||
signedPreKeyId INTEGER NOT NULL,
|
||||
baseKey BLOB NOT NULL,
|
||||
UNIQUE(id, signedPreKeyId, baseKey) ON CONFLICT FAIL
|
||||
) STRICT;
|
||||
`);
|
||||
}
|
||||
@@ -122,6 +122,7 @@ import updateToSchemaVersion1430 from './1430-call-links-epoch-id.js';
|
||||
import updateToSchemaVersion1440 from './1440-chat-folders.js';
|
||||
import updateToSchemaVersion1450 from './1450-all-media.js';
|
||||
import updateToSchemaVersion1460 from './1460-attachment-duration.js';
|
||||
import updateToSchemaVersion1470 from './1470-kyber-triple.js';
|
||||
|
||||
import { DataWriter } from '../Server.js';
|
||||
|
||||
@@ -1601,6 +1602,7 @@ export const SCHEMA_VERSIONS: ReadonlyArray<SchemaUpdateType> = [
|
||||
{ version: 1440, update: updateToSchemaVersion1440 },
|
||||
{ version: 1450, update: updateToSchemaVersion1450 },
|
||||
{ version: 1460, update: updateToSchemaVersion1460 },
|
||||
{ version: 1470, update: updateToSchemaVersion1470 },
|
||||
];
|
||||
|
||||
export class DBVersionFromFutureError extends Error {
|
||||
|
||||
Reference in New Issue
Block a user