MongoDB was rejecting status updates to 'tts_failed' and 'render_failed'
because these values weren't in the schema validator's enum, even though
they were defined in the Python JobStatus model.
This caused TTS failures to leave jobs stuck in 'tts_generating' status
with no error feedback to users - the WriteError from MongoDB prevented
the status and error fields from being updated.
The migration adds both failed statuses to the jobs collection validator.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The rendering_video status was defined in job.py and frontend types but
was missing from the MongoDB schema validator, causing document update
failures when jobs transitioned to the rendering_video state.
Changes:
- Add migration script to update existing databases
- Update mongodb-init.js for new database setups
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add migration to update jobs collection validator with new statuses
- Update mongodb-init.js for fresh deployments
- Fix deploy.sh to properly run migrations with 'python migrate.py up'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>