Files
Desktop/ts/sql/migrations/1200-attachment-download-source-index.std.ts
Fedor Indutny 44076ece79 Rename files
2025-10-16 23:45:44 -07:00

15 lines
491 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/sqlcipher';
export default function updateToSchemaVersion1200(db: Database): void {
// The standard getNextAttachmentDownloadJobs query uses active & source conditions,
// ordered by received_at
db.exec(`
CREATE INDEX attachment_downloads_active_source_receivedAt
ON attachment_downloads (
active, source, receivedAt
);
`);
}