Document patching and schema deployment fixes
Published: June 17, 2026
v2.24.0
Improvements
patch_documentstool: Renamed frompatch_documentand added support for applying patches to multiple documents in one call.patch_documentstool: Reworked patching to mirror@sanity/clientpatch()operations. It now accepts an array of patches built fromset,setIfMissing,unset,inc,dec,insert, anddiffMatchPatchplusappendandprependshorthands, with an optionalifRevisionIdguard. All patches in a single call are applied as one transaction. Edits continue to save to the draft or release version, and editing documents in a release is supported withreleaseId.create_versiontool: Uses the draft content as the base for new release versions when a draft exists.
Fixes
deploy_schematool: Fixed an issue wheredeploy_schemacould fail with a duplicatemediafield error after deploying image or file types, which blocked further schema changes for some users. Affected schemas recover automatically on the next deploy.