-- +goose Up
CREATE TABLE transcribe_jobs (
    id TEXT PRIMARY KEY,
    state TEXT NOT NULL,
    delay_time DATETIME,
    
    file_id TEXT,
    recognition_op_id TEXT,
    transcription_text TEXT,   
    
    acquisition_id TEXT,
    acquire_time DATETIME,

    is_error BOOLEAN NOT NULL,
    error_text TEXT,

    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    
    FOREIGN KEY (file_id) REFERENCES files(id)
);

-- +goose Down
DROP TABLE transcribe_jobs;
