signal-desktop/ts/sql/migrations/79-paging-lightbox.ts

17 lines
503 B
TypeScript
Raw Normal View History

2023-03-03 19:03:15 -08:00
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2025-03-12 14:45:54 -07:00
import type { Database } from '@signalapp/sqlcipher';
2023-03-03 19:03:15 -08:00
2025-08-06 10:32:08 -07:00
export default function updateToSchemaVersion79(db: Database): void {
db.exec(`
DROP INDEX messages_hasVisualMediaAttachments;
CREATE INDEX messages_hasVisualMediaAttachments
ON messages (
conversationId, isStory, storyId,
hasVisualMediaAttachments, received_at, sent_at
)
WHERE hasVisualMediaAttachments IS 1;
`);
2023-03-03 19:03:15 -08:00
}