Skip to content

How to do data migrations when making changes to models? #1998

Answered by dansimau
dansimau asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks @coolsoftwaretyler this is very interesting, thanks for the reply. Sounds like a very good solution for mobx-state-tree.

I haven't implemented anything yet but I think I am going to go with the versioned approach. One reason is that I intend to generate models automatically from a schema so they are consistent between server/client and I like the fact that the version will be explicit. This can be useful for debugging, or syncing between server/client and leaves the door open for migrations, if we need that in the future.

(Side note: I ended up going with vanilla MobX for now.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dansimau
Comment options

Answer selected by coolsoftwaretyler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants