migrating-motoko

Installation
SKILL.md

Inline Actor Migration

Migrate actor state across canister upgrades using a migration expression attached to the actor. Each upgrade has at most one migration function.

For multi-migration with a migrations/ directory, load migrating-motoko-enhanced instead.

When to Use

Implicit migration (no code needed)

The runtime allows the upgrade if the new program is compatible with the old:

  • Adding actor fields
  • Removing actor fields
  • Changing mutability (varlet)
  • Adding variant constructors
  • Widening types (NatInt)

Explicit migration required

Installs
43
GitHub Stars
26
First Seen
May 10, 2026
migrating-motoko — dfinity/icskills