Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why I'm So Happy About MongoDB. Parent comment
each version migration is a function that takes a record in an old state a migrates it to a new one.
once you read a record from the db that has an outdated version number you run all the pending migrations and then save.
with this scheme your application code only has to know how to deal with the latest schema version. all the rest is handled by migrations.
There are no comments on this comment yet.
each version migration is a function that takes a record in an old state a migrates it to a new one.
once you read a record from the db that has an outdated version number you run all the pending migrations and then save.
with this scheme your application code only has to know how to deal with the latest schema version. all the rest is handled by migrations.