Replies: 8 comments
-
Akita doesn't support migrations. |
Beta Was this translation helpful? Give feedback.
-
Understood, any pointers where to look to custom built this? Happy to build a lib for akita as we def need this. |
Beta Was this translation helpful? Give feedback.
-
Read the persist-state source code. |
Beta Was this translation helpful? Give feedback.
-
Assign to each store state a version number, then intercept the initial state imports from storage by passing a custom |
Beta Was this translation helpful? Give feedback.
-
Totally understand that most people don't make an effort to look into the source, I'm not one of those guys. ;) But I see now that the question was unclear: Any suggestions are highly appreciated. @xbaun Thank you for the pointer. For simple scenarios (data resides in same store) this will work just fine and is a great start Here are some scenarios we have already encountered and would like to cover with migrations:
|
Beta Was this translation helpful? Give feedback.
-
I'm not familiar with any library. But I know that indexeddb has a nice built-in migration API. |
Beta Was this translation helpful? Give feedback.
-
@NetanelBasal Got it thx. Thats def an avenue we are looking at. The migrations for Indexeddb look very much the same as our backend migrations which could be a plus even if they are slightly verbose at first sight. |
Beta Was this translation helpful? Give feedback.
-
Nevermind, my suggestion only partially covered your use-case (same-store). |
Beta Was this translation helpful? Give feedback.
-
We use akita + persitance to store user ui settings in our apps. As an apps progress the schema of this data changes. This is akin to database migrations on the server side.
I know that under the covers akita uses the same mechanism t store the data as redux. Looking at migrations +n redux I found the following, but due to lack of further info + redux knowledge I'm not sure if this is a viable path:
https://github.com/rt2zz/redux-persist/blob/master/docs/migrations.md
What is the best way to achieve this? Optimally in a non redux manner.
I'm submitting a...
Beta Was this translation helpful? Give feedback.
All reactions