<?php

return <<<'SQL'
CREATE TABLE scan_import_pages (
    id CHAR(36) NOT NULL PRIMARY KEY,
    job_id CHAR(36) NOT NULL,
    page_number INT NOT NULL,
    image_path VARCHAR(255) NULL,
    image_width INT NULL,
    image_height INT NULL,
    processing_status VARCHAR(50) NOT NULL DEFAULT 'pending',
    confidence DECIMAL(5,2) NULL,
    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    UNIQUE (job_id, page_number),
    FOREIGN KEY (job_id) REFERENCES scan_import_jobs(id)
);
SQL;
