ALTER TABLE `tb_document_import_batch`
    ADD COLUMN `interrupt_code` varchar(64) NULL DEFAULT NULL COMMENT '中断错误码'
        AFTER `retryable_failed_count`,
    ADD COLUMN `interrupt_message` varchar(500) NULL DEFAULT NULL COMMENT '中断原因'
        AFTER `interrupt_code`,
    ADD COLUMN `interrupted_at` datetime NULL DEFAULT NULL COMMENT '中断时间'
        AFTER `interrupt_message`,
    ADD COLUMN `recovery_pending` tinyint(1) NOT NULL DEFAULT 0
        COMMENT '是否存在待恢复调度'
        AFTER `interrupted_at`,
    ADD COLUMN `recovery_file_keys_json` longtext NULL
        COMMENT '待恢复文件键 JSON'
        AFTER `recovery_pending`,
    ADD COLUMN `recovery_token` varchar(64) NULL
        COMMENT '恢复调度令牌'
        AFTER `recovery_file_keys_json`,
    ADD COLUMN `recovery_lease_until` datetime NULL
        COMMENT '恢复调度租约到期时间'
        AFTER `recovery_token`,
    ADD INDEX `idx_document_import_batch_recovery`
        (`status`, `recovery_pending`, `modified`, `id`) USING BTREE;
