State Migration Tool

View as Markdown

Summary

  • Paste AdapTable State for one major version and migrate it to another
  • The same page runs inside AdapTable DevTools against the Grid you are inspecting
  • State is migrated in memory and is not stored

The State Migration Tool runs AdaptableUpgradeHelper.migrateAdaptableState on a server.

This allows you to read the migrated State and the migration log before changing the application.

Find Out More

See Migrating AdapTable State for full details on this topic

Panels

The State Migration Tool contains 2 panels:

Source Panel (Left)

The left panel is the source of the State.

Choose the major version the State was saved with and paste the State as JSON or JSON5.

Comments, trailing commas, single quotes, and unquoted keys are all allowed.

Caution

AdapTable version 16 is the oldest version the migration tool supports

Target Panel (Right)

The right panel is the target.

Choose the major version to migrate to, and the format of the result.

Note

  • JSON is the default choice
  • JSONC adds trailing commas
  • JSON5 uses unquoted keys where it can

That choice is sent as format on POST /migrate, and the response body is written in the same format.

Show diff compares the source with the migrated State in that format.

The target list is every major this server can produce, up to the version it was built with.

Important

Hint

  • You can run the same migration in your own Node process if you wish
  • Simply import AdaptableUpgradeHelper from @adaptabletools/adaptable/upgrade

From the command line

The adaptable CLI runs the same migration locally, on an exported State or straight on the initialState literal in a source file, and reports the leftovers it could not convert with their positions:

Terminal
npx -y @adaptabletools/adaptable-mcp@^1 migrate state src/adaptableOptions.ts --from 23 --to 24 --out migrated.json

This is what the adaptable-upgrade Agent Skill uses to write ADAPTABLE_UPGRADE_STATE/ in an upgrade plan; check state on the result then validates it against the target version's types.

In DevTools

The AdapTable DevTools Migrate tab opens this page in live mode.

The source version and State are taken from the Grid that the user is currently inspecting.

Note

The state taken is the persistent State, without the transient Internal, Popup, Comment and Plugins sections

Choose the target version on the right — usually the next major — and use Restore to grid to load the migrated State back into that instance.