8
Skayo
6y

How about a Git for Databases?
Do your changes, delete things, create things, and then when you are sure push these changes to your server.
If you did something wrong like accidentally delete fucking everything, just revert and everything is like before again.
Also you can view history and blame people for doing something wrong.

Tell me what you think about this. Not clue how you could implement this tho... Also I have enough to do already so feel free to take this idea!

Comments
  • 3
    i think oracle database is a bit like that. but im not sure
  • 0
    <@wowotek>
    Oh really? Gotta look into that then
  • 2
    Someone here accidently lose his data and don't want it to appens again
  • 1
    This is called event sourcing. Also there are some (private) blockchain databases which could fit these needs
  • 5
    Isn't called backups?
  • 1
    entityframework handles this nicely - but it won't keep a transactional history of the actual data, just the structure of the db.

    EF codefirst approach has some really nice attributes, but it can also be a headache when you feel like you don't have control over the db (even tho you do - you just need to learn the CF method for doing what you already know how to do directly on the db)
  • 2
    Transactions and backups handle this.

    Most databases does not support it in a way more like git due to performance.

    When such options are required its usually built on top of the db using event sourcing where every change is logged and timestamped and a rollback is just replaying the log without the change.
  • 0
    you could add a modified field and every modification inserts the value with an newer value.
  • 1
    "id you do something wrong"

    who is "you"? which account? the admin one the same as you manually use? or the guest one the same as 20k thousands of, your api consumers use?
    which one?

    nice in principle, either non-usable or useless in practice
  • 0
    Ora has all that. Saved my ass a couple of times when I accidentaly removed too many records in prod. Select * from table_x as of <timestamp>; pitty that flash memory is limited :)
Add Comment