# Rails 2.0 to 2.1 migration problem

**URL:** <https://www.ruby-forum.com/t/rails-2-0-to-2-1-migration-problem/141845>\
**Category:** Rails\
**Created:** [July 1, 2008, 12:20am UTC](https://www.ruby-forum.com/t/rails-2-0-to-2-1-migration-problem/141845 "2008-07-01T00:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinderedmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@cinderedmonkey](https://www.ruby-forum.com/u/cinderedmonkey)\
**Post date:** [July 1, 2008, 12:20am UTC](https://www.ruby-forum.com/t/rails-2-0-to-2-1-migration-problem/141845/1 "2008-07-01T00:20:22Z")

</div>

Hi,  
I have been using rails 2.0 and just recently upgrade to 2.1.  
The project I was working with has version 1 to 10.  
I then created a migration version 200806xxx…etc.  
Now I wish to back out the last migration and go back to version 10.  
Doing a rake db:migrate version=10 does not work.  
Heck, going back go version=1 doesn’t either.  
Neither does rake db:migrate:down version=200806xxxxxx since it would  
complain that it needs a version…presumably complaining that my  
version 200806xxxxx is the lowest version available.

Anyone have any ideas?  
Or would I need to recreate my project from the start with rails 2.1?

Thanks in advanced.  
Hubert

---

<div class="post-metadata">

**Author:** ![cinderedmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@cinderedmonkey](https://www.ruby-forum.com/u/cinderedmonkey)\
**Post date:** [July 1, 2008, 12:27am UTC](https://www.ruby-forum.com/t/rails-2-0-to-2-1-migration-problem/141845/2 "2008-07-01T00:27:24Z")

</div>

Hi,

On Mon, Jun 30, 2008 at 1:51 PM, cinderedMonkey  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have been using rails 2.0 and just recently upgrade to 2.1.  
> The project I was working with has version 1 to 10.  
> I then created a migration version 200806xxx…etc.  
> Now I wish to back out the last migration and go back to version 10.  
> Doing a rake db:migrate version=10 does not work.  
> Heck, going back go version=1 doesn’t either.  
> Neither does rake db:migrate:down version=200806xxxxxx since it would  
> complain that it needs a version…presumably complaining that my  
> version 200806xxxxx is the lowest version available.

Environment variables are case-sensitive. It needs to be VERSION, not  
version:

rake db:migrate VERSION=10

Does this work any better for you?

~ j.

---

<div class="post-metadata">

**Author:** ![cinderedmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@cinderedmonkey](https://www.ruby-forum.com/u/cinderedmonkey)\
**Post date:** [July 1, 2008, 12:47am UTC](https://www.ruby-forum.com/t/rails-2-0-to-2-1-migration-problem/141845/3 "2008-07-01T00:47:17Z")

</div>

Uggg, I could have sworn typo aside, I have used ‘VERSION’ as opposed  
to ‘version’ but seems that with all the combinations I have tried, I  
guess I didn’t use the ‘VERSION’ properly because as you mentioned,  
this did the charm.  
I’ll have to archive this as a ‘duh’ moment 😉

Surprised there were no error messages though.

Thanks for the quick reply, greatly appreciated.

Hubert
