bynk.agent.migrate_duplicate
Error Two migrate steps in one agent read the same schema version.
A stored record carries the schema version it was written at, and is loaded through the one migrate from N step for that version. Two steps for the same N would leave the compiler to choose between them, so the second is refused. Merge them into one step that assigns every field the move from version N needs. A step that assigns one field twice is bynk.agent.migrate_duplicate_assignment.
Example
type CartV1 = { owner: String, total: Int }
migrate from 1 (old: CartV1) { ownerName := old.owner}migrate from 1 (old: CartV1) { // ✗ version 1 again totalCents := old.total * 100}
migrate from 1 (old: CartV1) { ownerName := old.owner totalCents := old.total * 100 // ✓ one step does both}In the Book
See also
- Every code in its category, Agents, on the diagnostic index.
bynk explain bynk.agent.migrate_duplicateshows the same from the installed toolchain, without a network.