You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is something we have been thinking about but don't yet have a good answer on to be honest. It's part of a broader issue of data migration with CRDTs.
Do you have ideas on how you would like to see it work? One idea I've had is to allow you to provide a script to the server that runs every time the data is loaded from storage, which would give you a place to do any migration tasks, which would then be synchronized down to clients when they connect.
I followed the example tldraw App https://github.com/drifting-in-space/y-sweet/blob/main/examples/nextjs/src/app/tldraw/useYjsStore.ts#L24
The issue is tldraw changed their document structure a bit tldraw/tldraw#3463
loadSnapshot should take care of this issue.
But loadSnapshot is only called to initialize the empty document it looks like.
I don't quite follow how y-sweet loads everything that is already on the server and needs to be initially loaded.
How would I achieve a migration on this data?
The text was updated successfully, but these errors were encountered: