apply_migration_patch
Apply a validated patch to update one contest, enforcing field whitelist, schema compliance, destructive-write protection, and cross-field consistency before any write.
Instructions
Apply a validated normalized patch to update a single contest.
All patches go through 4 validations before writing:
Field whitelist — only allowed fields may be patched
Schema compliance — types, enums, formats checked
Destructive write protection — populated fields not overwritten with null
Cross-field consistency — no contradictory values
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | If True, bypass destructive write protection (use with caution) | |
| contest_id | Yes | MongoDB ObjectId of the contest (as string) | |
| patch_json | Yes | JSON string with fields to update |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||