Rails Migrations and Subversion

In rails, migrations are generated in such a way that they create a numbered migration with an up and a down schema direction. This has been incredibly helpful when dealing with the schema changes:

1 paul-pagels-computer:~/RailsProjects/project paulpagel$ ruby script/generate migration 
2 CreatePacketTimestamp exists db/migrate create db/migrate/013createpacket_timestamp.rb

The problem our team has found is doing migrations with subversion.

This creates a numbered migration with an up and a down schema direction. This has been incredibly helpful when dealing with the schema changes. The problem our team has found is doing migrations with subversion.

You run migrations by:

1 paul-pagels-computer:~/RailsProjects/project paulpagel$ rake migrate

Which looks in the schema_info table to find which version of the schema your database is representing, and updates it to the most recent version (the highest number).

The problem comes into play when you have multiple people making migration scripts on their local machine at the same time. If two different people did a migration at the same time and committed them you would end up with two migrations. Which one gets run?

I am not sure how to solve this one yet. I have been loving rails, but this has already has put a dampener on it.

Paul Pagel, Chief Executive Officer

Paul Pagel has been a driving force in the software craftsmanship movement since its inception.