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-step migration with a migrations/ directory, load migrating-motoko-enhanced instead.

What This Is

The (with migration = ...) syntax lets you transform actor state during an upgrade — rename fields, change types, split or merge values. The migration runs exactly once per upgrade; on fresh install, the actor's initializers run normally.

When to Use

Related skills

More from dfinity/icskills

Installs
4
GitHub Stars
16
First Seen
5 days ago