Reorder migrations

This commit is contained in:
Fedor Indutny 2023-01-30 11:55:38 -08:00 committed by GitHub
parent b78235e109
commit 270804d62d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 5 deletions

View file

@ -0,0 +1,25 @@
// 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 default function updateToSchemaVersion75(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 75) {
return;
}
db.transaction(() => {
// This was previously a FTS5 migration, but we had to reorder the
// migrations for backports.
// See: migrations 76 and 77.
db.pragma('user_version = 75');
})();
logger.info('updateToSchemaVersion75: success!');
}