mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 01:48:13 +01:00
Notification Profiles: Normalize ids
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { LoggerType } from '../../types/Logging.std.js';
|
||||
import type { WritableDB } from '../Interface.std.js';
|
||||
import { sql } from '../util.std.js';
|
||||
|
||||
export default function updateToSchemaVersion1490(
|
||||
db: WritableDB,
|
||||
logger: LoggerType
|
||||
): void {
|
||||
const [query, params] = sql`
|
||||
DELETE FROM notificationProfiles
|
||||
WHERE id != lower(id);
|
||||
`;
|
||||
const result = db.prepare(query).run(params);
|
||||
|
||||
logger.info(
|
||||
`Removed ${result.changes} notification profiles with non-lowercase ids`
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user