Migrate legacy collections
A legacy collection uses a collection.toml marker and .toml request files. Migrate it to DNML before you open, edit, or run its requests.
Dynomate migrates only when you tell it to. It converts the full collection and keeps the original files.
Find Legacy Collections
Request Collections shows the legacy collections in tracked folders. To add one, select Open collection. To see its requests, expand it.
Migrate in the App
- Expand the legacy collection.
- Select a request.
- In the Migrate collection? dialog, select Migrate collection.
Dynomate migrates the full collection and opens the request.
If a tab from an earlier session shows Update this request collection, select Migrate.
What Migration Keeps
Dynomate writes a <name>.dnml file for each request. It keeps:
- The request name and request variables.
- All operations in order, with name, type, dependency, AWS profile, and table ARN.
- Keys, items, expressions, and attribute aliases.
- Variable and result references, as DNML templates with result roots.
To keep the legacy behavior, Dynomate also sets:
- The error policy
continue, so later operations run after a failure. returnConsumedCapacity = "indexes"on Query operations.returnValues = "none"on Update item operations.
Dynomate writes collection.dnml only if all requests in the folder and the new marker are valid. Dynomate keeps the .toml files and does not change environment files.
Errors and Conflicts
If a request does not convert, the migration stops and shows the error and the file. Dynomate removes the new files and does not write collection.dnml. Common causes:
- A file is not valid TOML, or has fields that the legacy format does not define.
- A filename is different from its request name.
- Two operations have the same result root, or a variable name is the same as a result root.
- A variable name is not a valid identifier.
Dynomate never overwrites a .dnml file that has different content. It reuses an identical file, so you can retry an interrupted migration.
- Correct the file, or move the
.dnmlfile that conflicts to a different folder. - Migrate the collection again.
After Migration
- The migrated
.dnmlfiles are the saved requests. - A tab from an earlier session loads the migrated file. Dynomate does not keep unsaved legacy changes.
- New request and Save to collection work only with DNML collections.
- Remove the legacy files in a separate commit. See Version control and teams.
Migrate From the CLI
$ dynomate-cli requests migrate --collection ./orders The CLI does the same migration. It changes nothing in a DNML collection. See requests migrate.