Migrations `dryRun` on multiple samples
When I run a migration in dry mode it executes on only one single document, which sometimes is skipped because it's not the instance of a document that needs to be migrated, which makes it hard to test the migration. Any suggestions?
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Ask in the <#1228095053885476985> channel to get a response from <@1072591948499664996>.
- Avoid tagging staff unless specifically instructed.
Thank you!
1. It does a bunch but only logs one. Maybe drop a log in the migration itself off before/after? You can also pass the cursor in to start the next batch.
Good call that it could print the first one that differs.
2. I have a new version in the works where you can pass in a custom range to the migration so it doesn’t have to walk the whole table. Like q=> q.withIndex(
that would be great! Thanks Ian!
Could you validate
convex-helpers@0.1.59-alpha.0
? It should print the first difference. The new version is a Component, so you'll have to wait for (2), but there's a beta version I'll DM you