-
Notifications
You must be signed in to change notification settings - Fork 16
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
Migrating old data #26
Comments
It won't be to hard to handle your case. The new serialization library add some special data during the serialization. I can change it to return the raw JSON object instead of the text. But for more complex data, like class serialization, it will be more difficult as the old library and the new one operate differently. |
Another option is to allow custom serialization library (so the old one can be used, or even a simple |
Custom serialisation is a good idea. But if the library can handle the migration from old format automatically, that would mean the switch to V2 will be much smoother for a lot of Devs. We should also add a prominent warning in the changelog that data loss is a possibility when upgrading. |
@sidharthv96 The new version The version also allow to change the serialization functions used: documentation here |
Before the upgrade, I wrote a test to make sure existing data isn't affected when a user loads the site with the new version.
https://github.com/mermaid-js/mermaid-live-editor/blob/04b898ee5441353ff3cde3a6f3f97dee26153b37/cypress/e2e/history.spec.ts#L17-L43
But this test is failing with v2, but passes in v1.
Unless there is a clear path for migration, this is a serious issue that could result in tricky situations.
The text was updated successfully, but these errors were encountered: