Coder Social home page Coder Social logo

Comments (2)

JKamsker avatar JKamsker commented on August 15, 2024

My library is able to migrate the whole database at once. But the main idea of it was to be able to upgrade documents on the fly.

To your library:
Looks good.
Tooling such as dotnet-ef would be great which automatically figures out the migrations for you and applies them if neccessary.
I spared myself from it till an unspecified future point in time 😅

from litedb.

ssteiner avatar ssteiner commented on August 15, 2024

You know, I was thinking about the dotnet-ef commands as well after writing it and looking through my migrations again before posting. However, I'd expect that to take more time than I invested so far. Plus, I'd have to store the schema for every migration somewhere in order to calculate the differences (like the class derived from ModelSnapshot that dotnet-ef creates).

I was actually thinking I'd be less diligent when writing migrations than when using EFCore - a new property that gets set on some documents, and then you revert to an older version, there's no immediate harm if the property lingers around in the DB, and any update will kill it anyway (I presume at least.. haven't tried that) - it only gets critical if you re-add as another type. So I'll probably end up writing migrations just for renaming properties and moving properties. But I guess if I get fed up writing manual migrations I might just consider some kind of simple automation.

from litedb.

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.