-- Editable workspace drafts for Docling / document editor

CREATE TABLE IF NOT EXISTS document_workspace (
    storage_path TEXT PRIMARY KEY,
    source_format VARCHAR(32) DEFAULT 'markdown',
    content TEXT NOT NULL DEFAULT '',
    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS idx_document_workspace_updated ON document_workspace (updated_at DESC);
