mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
17 lines
495 B
TypeScript
17 lines
495 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import type { Database } from '@signalapp/sqlcipher';
|
|
|
|
export default function updateToSchemaVersion1540(db: Database): void {
|
|
db.exec(
|
|
'DROP INDEX IF EXISTS messages_conversationId_hasExpireTimer_expirationStartTimestamp;'
|
|
);
|
|
|
|
db.exec(`
|
|
CREATE INDEX messages_conversationId_expirationStartTimestamp
|
|
ON messages (conversationId, expirationStartTimestamp)
|
|
WHERE hasExpireTimer IS 1;
|
|
`);
|
|
}
|