Tuesday, March 3, 2009

A general issue with Ruby

I see why Ruby has the whole "Migrations" idea, to systematize changes to the database. However, there is a little too much magic for my liking. When dealing with database changes, we normally have to do some cryptic work, but we know exactly what happens. When making a Ruby migration, it's easy to make the change, but you also have to set up the reverse change, and if you fsck that up, you cannot roll back correctly. The fact that you (for any non-trivial change) have to make the reverse migration and get it right is a weak spot. Hopefully the automatic generation of migrations for trivial changes can do enough that it doesn't become a big problem. If I were designing Ruby, I'd try very hard to make the reverse migration automatic.

No comments:

Post a Comment