Skip to main content

## MIGRATION_013

# Constant MIGRATION_013

Source

    const MIGRATION_013: &str = r#"
    -- Add composite index for offline mode filtering
    -- This speeds up queries that join items with downloads to show only downloaded content
    CREATE INDEX IF NOT EXISTS idx_downloads_item_status ON downloads(item_id, status);
    "#;

Expand description

Migration to add composite index for offline mode filtering

- Adds index on (item_id, status) for efficient JOIN queries in OfflineRepository
- Significantly improves performance when filtering items by download status