CREATE TABLE precomputed_reels (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    span TEXT NOT NULL,
    library_key TEXT NOT NULL,
    cache_key TEXT NOT NULL,
    output_path TEXT NOT NULL,
    title TEXT NOT NULL,
    media_count INT NOT NULL,
    render_version INT NOT NULL DEFAULT 1,
    tz_offset_minutes INT NOT NULL,
    voice TEXT,
    generated_at BIGINT NOT NULL
);
CREATE INDEX idx_precomputed_reels_span_library ON precomputed_reels(span, library_key, generated_at DESC);
