With the steps below, you can test a v1 to v2 Bootstrap Migration using a secondary test Stedi account.
-
Setup the
.env
with just aSTEDI_API_KEY
for the source account. -
Create a backup of
partners-configuration
and Guides by running:
npx ts-node-esm ./src/scripts/backup.ts
-
Change your
.env
to another API key for your target empty test account. -
Restore the un-migrated Stash config (and Guides) by running:
npx ts-node-esm ./src/scripts/restore.ts
-
Update at least one profile from each partnership in the
partners-configuration
Stash keyspace to includecoreProfileType: "local"
so the migration script can correctly identify the local profile. -
Run the migration script:
npm run migrate
- Ensure you change any destination webhooks before testing end-to-end flows.
-
If the migration fails for any reason, delete any Profiles and/or Partnership records created by the early migration attempt in the Partners UI, but you attempt to retry it.
-
The unneeded Stash records will only be destroyed if the entire migration as been successful, so failed migrations can be retried without a restore.