-- Manual Job Creation for Stuck Document
-- Use this if PostgREST schema cache won't refresh

-- Create job for stuck document
INSERT INTO processing_jobs (
  document_id,
  user_id,
  status,
  attempts,
  max_attempts,
  options,
  created_at
) VALUES (
  '78359b58-762c-4a68-a8e4-17ce38580a8d',
  'B00HiMnleGhGdJgQwbX2Ume01Z53',
  'pending',
  0,
  3,
  '{"strategy": "document_ai_agentic_rag"}'::jsonb,
  NOW()
) RETURNING id, document_id, status, created_at;

-- Verify job was created
SELECT id, document_id, status, created_at 
FROM processing_jobs 
WHERE document_id = '78359b58-762c-4a68-a8e4-17ce38580a8d'
ORDER BY created_at DESC;

