/approval/pending was returning 500 UndefinedColumnError because the
approval router and MCP get_pending_approvals tool both query columns
(agent_name, action_type, description, context_data, approver_id,
approval_note, updated_at) that were never added in the initial schema
migration 001.
Adds migration 002 to ALTER TABLE ab_directive_log with all seven
missing columns (all nullable so existing rows are unaffected) and an
index on updated_at for efficient polling.
Deploy: after pulling on miaai, run:
cd /root/odoo/odoo-ai && docker compose exec agent-service \
alembic -c agent_service/migrations/alembic.ini upgrade head
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>