Code Monkey home page Code Monkey logo

Comments (2)

agilgur5 avatar agilgur5 commented on May 20, 2024 1

Hey @lon9man sorry for not responding to this. My GitHub status at the time mentioned I was taking a break from OSS due to toxicity and abuse. Coming back now per my current status.

Getting to the question at hand, this is a schema change / migration question. #23 actually talks about multiple ways to do migrations -- very similar to how DBs handle it. I've reworded the title to mention this.

One way could indeed be to clear all storage as you suggest and just start from scratch. If the offline data can be easily retrieved, resetting in that fashion may be a good option.

Another way would be to run a migration when a schema change is detected. Effectively, this would be the same as back-end DB schema migration, but done client-side on pure JSON (or JS objects if #23 is implemented). Each migration would likely have to be hand-coded, there isn't necessarily a simple way to automatically figure out what to do when a schema changes (same as with a DB).
Backward-compatible migrations are a whole topic in DBs with multiple ways of achieving them, so I can't really describe that with the depth it requires in an issue. Some examples include adding defaults, splitting into multiple migrations, etc.

I would recommend thinking of your persisted information as a secondary DB or cache; you can model interactions with persisted data fairly similarly to that of a back-end DB or cache.

from mst-persist.

lon9man avatar lon9man commented on May 20, 2024

any ideas?

from mst-persist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.