Send and receive PniSignatureMessage
This commit is contained in:
parent
95be24e8f7
commit
00cfd92dd0
43 changed files with 1082 additions and 164 deletions
29
ts/sql/migrations/66-add-pni-signature-to-sent-protos.ts
Normal file
29
ts/sql/migrations/66-add-pni-signature-to-sent-protos.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { Database } from 'better-sqlite3';
|
||||
|
||||
import type { LoggerType } from '../../types/Logging';
|
||||
|
||||
export default function updateToSchemaVersion66(
|
||||
currentVersion: number,
|
||||
db: Database,
|
||||
logger: LoggerType
|
||||
): void {
|
||||
if (currentVersion >= 66) {
|
||||
return;
|
||||
}
|
||||
|
||||
db.transaction(() => {
|
||||
db.exec(
|
||||
`
|
||||
ALTER TABLE sendLogPayloads
|
||||
ADD COLUMN hasPniSignatureMessage INTEGER DEFAULT 0 NOT NULL;
|
||||
`
|
||||
);
|
||||
|
||||
db.pragma('user_version = 66');
|
||||
})();
|
||||
|
||||
logger.info('updateToSchemaVersion66: success!');
|
||||
}
|
|
@ -41,6 +41,7 @@ import updateToSchemaVersion62 from './62-add-urgent-to-send-log';
|
|||
import updateToSchemaVersion63 from './63-add-urgent-to-unprocessed';
|
||||
import updateToSchemaVersion64 from './64-uuid-column-for-pre-keys';
|
||||
import updateToSchemaVersion65 from './65-add-storage-id-to-stickers';
|
||||
import updateToSchemaVersion66 from './66-add-pni-signature-to-sent-protos';
|
||||
|
||||
function updateToSchemaVersion1(
|
||||
currentVersion: number,
|
||||
|
@ -1945,6 +1946,7 @@ export const SCHEMA_VERSIONS = [
|
|||
updateToSchemaVersion63,
|
||||
updateToSchemaVersion64,
|
||||
updateToSchemaVersion65,
|
||||
updateToSchemaVersion66,
|
||||
];
|
||||
|
||||
export function updateSchema(db: Database, logger: LoggerType): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue