-- Track blob upload metrics
CREATE TABLE IF NOT EXISTS uploads (
    blob_hash TEXT PRIMARY KEY,
    uploaded_at TIMESTAMP NOT NULL,
    size INTEGER NOT NULL,
    duration_ms INTEGER NOT NULL,
    FOREIGN KEY (blob_hash) REFERENCES blobs(blob_hash)
);

CREATE INDEX idx_uploads_uploaded_at ON uploads(uploaded_at);
CREATE INDEX idx_uploads_duration ON uploads(duration_ms);