Freigeben über


Handling different versions of the database

The only way to handle database changes I've used before was either a number of SQL scripts which usually was a pain since it was almost impossible to remember what version of the database you had so you never knew which of the scripts to run. A better method I've used was to use a migration tool that identified differences between two databases. Basically a merge where I merged all changes in one database to another.

Since I've been protected from database work for a while and (shame on me) never took the time to look at Ruby I did not discover Migrations up until recently. And for everybody who do not want to use the ruby version, there is a port for .Net which I definitely will have in mind the day I'm back to working with databases again. The idea is to create one class for each change and including a version number in that class. The rest is handled by the framework.