Rails 2.0 to 2.1 migration problem

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

Hi,

On Mon, Jun 30, 2008 at 1:51 PM, cinderedMonkey
[email protected] 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.

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 :wink:

Surprised there were no error messages though.

Thanks for the quick reply, greatly appreciated.

Hubert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs