-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for adding new fields to previously serialized structs #299
Comments
Seems to be related: #114 |
Borsh does not include the schema inside the serialized data, so you should plan your upgradability accordingly. If you start from scratch, you have two paths:
If you already have the data serialized with the old Would you like to contribute a README/docs for this topic? I would be happy to review a PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
We have some existing serialized data of something like
We would now like to add a new field to the existing struct to have something like:
However, when deserializing existing data with the new
MyStruct
, the following error is returned:What is the recommended way to add fields to an existing struct, that already has serialized data?
The text was updated successfully, but these errors were encountered: