Trigger a Migration
Goal
Trigger a storage migration using Polkadot-JS Apps.
Use Cases
On-chain runtime upgrades that require a storage migration.
Overview
This simple guide presents the steps for triggering a runtime migration using Polkadot-JS Apps. It assumes that migration code is already written and that the new runtime has already been compiled.
Steps
1. Add custom types
In the Polkadot-js apps UI, go to Settings > Developer
to add your custom types from types.json
. You can either upload the file directly or paste the types right into the UI. Save it to add them.
2. Upload your runtime
In Developer > Sudo
, make a system.setCode
call by uploading your runtime (for example, ./target/release/wbuild/node-template-runtime/node_template_runtime.compact.wasm
).
Check the "with weight override" toggle to ignore block weights and set it to some arbitrary value.
3. Trigger the call
Hit "Submit Sudo Unchecked" and sign the transaction to trigger the call.
Examples
- Migrating the Nicks pallet example