Derive Macro Migrate

#[derive(Migrate)]
Expand description

Adds a From implementation to help migrate structs or enums. This will support the following migrations:

  1. Adding a new member to a struct where the member has a Default implementation.
  2. Changing the type of a member with the same name, where all the fields implement From. Default is not needed in this case by including the the migrate_nodefault attribute.
  3. Changing an enum variant’s fields where the all the fields implement From.

This will also work if a new variant is added to an enum, but if that’s the only change, and it’s added to the end of the existing variants, it will automatically be backward compatible because it won’t affect how bincode serializes the old variants. There are some other changes that can be made that are safe with bincode serialization, such as converting from Option to Vec.