Does adding a new Option field to a native_model struct need a separate version of the model? #98
-
In the case of adding a new field with an Option type to your existing native_model struct, does the model's version need to be incremented and an old version of the struct kept around to migrate from? |
Beta Was this translation helpful? Give feedback.
Answered by
vincent-herlemont
Jan 25, 2024
Replies: 1 comment
-
@Gawdl3y Yes, indeed, any change in a model must imperatively be managed with a new Rust type, which has the same id of |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Gawdl3y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Gawdl3y Yes, indeed, any change in a model must imperatively be managed with a new Rust type, which has the same id of
native_model
as the old one as well as a version increment. See the example code in the documentation ofmigrate
or from the demo project src-tauri/src/main.rs#L10-L43