BACKTRACE

(condense)

Back to Posts List

GET

Rails Migrations - Running a Single Migration

We all know the good old

rake db:migrate

And we all know the Rails 2.x
rake db:migrate:rollback

to go back in time and fix what we did.
Now, in Rails 2.x you can specify a single migration by specifing one of the each

rake db:migrate:up VERSION=migration_timestamp # Runs the self.up
rake db:migrate:down VERSION=migration_timestamp # Runs the self.down

Note that migrations are meant to be concurrent and that’s the most basic purpose in which they are there for, executing an out of line migration may cause you problems in the future, so try to stay as clean as possible when dealing with migrations

POST

blog comments powered by Disqus

I Don't have cookies.

ELAD ENV

Variable Value
LINKEDIN
TWITTER
FACEBOOK
GITHUB
WWR
IRC
{ 'irc.freenode.net' => [ '#rubyonrails', '#railsbridge', '#ruby', '#mootools' ]}
SKYPE
eladmeidar

You're seeing this error because I think it is funny.