Durable Objects: migration tags replaced by declarative `exports`
A new declarative exports field in your Wrangler configuration file replaces the imperative migrations array for managing Durable Object class lifecycle. Instead of writing an ordered list of migration steps with unique tags, you declare each Durable Object class your Worker exports and Cloudflare compares that against what's already deployed to determine what Durable Object state needs to be created, renamed, or deleted.
With legacy migrations, renaming ChatRoom to Room requires retaining both tagged steps:
<div><div><span>{</span></div></div><div><div><span> </span><span>"</span><span>migrations</span><span>"</span><span>:</span><span> </span><span>[</span></div></div><div><div><span> </span><span>{</span><span> </span><span>"</span><span>tag</span><span>"</span><span>:</span><span> </span><span>"v1"</span><span>,</span><span> </span><span>"</span><span>new_sqlite_classes</span><span>"</span><span>:</span><span> </span><span>[</span><span>"ChatRoom"</span><span>]</span><span> </span><span>},</span></div></div><div><div><span> </span><span>{</span></div></div><div><div><span> </span><span>"</span><span>tag</span><span>"</span><span>:</span><span> </span><span>"v2"</span><span>,</span></div></div><div><div><span> </span><span>"</span><span>renamed_classes</span><span>"</span><span>:</span><span> </span><span>[{</span><span> </span><span>"</span><span>from</span><span>"</span><span>:</span><span> </span><span>"ChatRoom"</span><span>,</span><span> </span><span>"</span><span>to</span><span>"</span><span>:</span><span> </span><span>"Room"</span><span> </span><span>}],</span></div></div><div><div><span> </span><span>},</span></div></div><div><div><span> </span><span>],</span></div></div><div><div><span>}</span></div></div>
With exports, you instead declare Room as the current class and mark ChatRoom as renamed:
<div><div><span>{</span></div></div><div><div><span> </span><span>"</span><span>exports</span><span>"</span><span>:</span><span> </span><span>{</span></div></div><div><div><span> </span><span>"</span><span>ChatRoom</span><span>"</span><span>:</span><span> </span><span>{</span></div></div><div><div><span> </span><span>"</span><span>type</span><span>"</span><span>:</span><span> </span><span>"durable-object"</span><span>,</span></div></div><div><div><span> </span><span>"</span><span>state</span><span>"</span><span>:</span><span> </span><span>"renamed"</span><span>,</span></div></div><div><div><span> </span><span>"</span><span>renamed_to</span><span>"</span><span>:</span><span> </span><span>"Room"</span><span>,</span></div></div><div><div><span> </span><span>},</span></div></div><div><div><span> </span><span>"</span><span>Room</span><span>"</span><span>:</span><span> </span><span>{</span><span> </span><span>"</span><span>type</span><span>"</span><span>:</span><span> </span><span>"durable-object"</span><span>,</span><span> </span><span>"</span><span>storage</span><span>"</span><span>:</span><span> </span><span>"sqlite"</span><span> </span><span>},</span></div></div><div><div><span> </span><span>},</span></div></div><div><div><span>}</span></div></div>
Each entry is keyed by class name. The state field carries the lifecycle (created by default — a live class — plus tombstone states deleted, renamed, and transferred, and the expecting-transfer receiving state for cross-Worker transfers).
Key improvements over the legacy migrations array:
- No migration tags. The current
exportsmap is the source of truth — there is no historical chain ofv1,v2,v3entries to maintain. - Structured deployment output. Wrangler reports when it creates, updates, deletes, renames, or transfers Durable Object classes. It also identifies stale configuration entries that are safe to remove. Deployments with no changes or notices do not print this output.
- Zero-downtime rename and transfer patterns are first-class. Tombstones may coexist with the source class still in code, enabling a three-deploy rename and a four-deploy cross-Worker transfer without runtime errors during the rollout window.
- Cross-Worker safety. When you delete or rename a class, Cloudflare lists every other Worker in your account whose bindings still reference the namespace, so you can redeploy them before the change goes live.
Existing Workers using the legacy migrations array continue to work unchanged. To move to exports, refer to the migration guide. exports and migrations are mutually exclusive within a single Worker.
For the full reference, refer to Durable Object class exports.
Fetched July 15, 2026


