mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-22 17:38:10 +01:00
Simplify database migrations
This commit is contained in:
@@ -1,25 +1,6 @@
|
||||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { Database } from '@signalapp/sqlcipher';
|
||||
|
||||
import type { LoggerType } from '../../types/Logging';
|
||||
|
||||
export const version = 950;
|
||||
|
||||
export function updateToSchemaVersion950(
|
||||
currentVersion: number,
|
||||
db: Database,
|
||||
logger: LoggerType
|
||||
): void {
|
||||
if (currentVersion >= 950) {
|
||||
return;
|
||||
}
|
||||
|
||||
db.transaction(() => {
|
||||
// This was a migration that enable secure-delete
|
||||
db.pragma('user_version = 950');
|
||||
})();
|
||||
|
||||
logger.info('updateToSchemaVersion950: success!');
|
||||
export default function updateToSchemaVersion950(): void {
|
||||
// This was a migration that enable secure-delete
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user