Skip to main content

## MIGRATION_012

# Constant MIGRATION_012

Source

    const MIGRATION_012: &str = r#"
    -- Add download source tracking
    -- Values: 'user' (explicit download), 'auto' (smart cache/queue precache)
    ALTER TABLE downloads ADD COLUMN download_source TEXT DEFAULT 'user';

    -- Index for filtering by source
    CREATE INDEX IF NOT EXISTS idx_downloads_source ON downloads(download_source);
    "#;

Expand description

Migration to track download source (user-initiated vs auto-cached)

- Adds download_source column to distinguish manual downloads from auto-caching
- Enables color-coded UI display