We are a software consultancy based in Berlin, Germany. We deliver
high quality web apps in short timespans.

Upstream Agile GmbH

Running a skipped Rails Migration

December 12, 2007 by alex

Sometimes it happens that you skip a migration. Imagine you were working on a branch and are now merging back into trunk. In the meantime someone committed the migration 303 into trunk but you also had a few migrations in your branch. Now your development database is on 306 and you missed 303. Instead of migrating back to 302 and then again up to 306 you can also do the following in your rails console:

>> require 'db/migrate/303_create_comments_table'
>> CreateCommentsTable.up

There goes your migration.