Introduce logging for unexpected incoming urgent values

This commit is contained in:
Scott Nonnenberg 2022-07-05 15:20:30 -07:00 committed by GitHub
parent f92be05b15
commit 5fcf97b43b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 278 additions and 83 deletions

View file

@ -0,0 +1,28 @@
// Copyright 2021-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 updateToSchemaVersion63(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 63) {
return;
}
db.transaction(() => {
db.exec(
`
ALTER TABLE unprocessed ADD COLUMN urgent INTEGER;
`
);
db.pragma('user_version = 63');
})();
logger.info('updateToSchemaVersion63: success!');
}