Forum: Ruby on Rails cannot migrate back

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Luma (Guest)
on 2009-03-21 22:41
(Received via mailing list)
hi,

I can't run back my migrations on Ubuntu:

rake db:migrate works as expected. I.e. after that, schema_migrations
includes some numbers. Then I run this in ubuntu's terminal:

user@ubuntu:~/project/src$ rake db:migrate version=0 --trace
(in /home/user/project/src)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
user@ubuntu:~/project/src$

Nothing happened, and schema_migration includes the same numbers as
before.

I have this problem with Rails 2.2.2 on Ubuntu 8.10 in development
mode, but not with Rails 2.0.2 and Windows Vista, also development.

I'm wondering why nobody seems to have the same problem... How can I
get it work?

Luma
Frederick C. (Guest)
on 2009-03-21 22:47
(Received via mailing list)
On Mar 21, 8:40 pm, Luma <removed_email_address@domain.invalid> wrote:
> hi,
>
> I can't run back my migrations on Ubuntu:
>
> rake db:migrate works as expected. I.e. after that, schema_migrations
> includes some numbers. Then I run this in ubuntu's terminal:
>
> user@ubuntu:~/project/src$ rake db:migrate version=0 --trace

That should be VERSION=0 - it's case sensitive (at least in the unix
world)

Fred
Phlip (Guest)
on 2009-03-21 23:02
(Received via mailing list)
> That should be VERSION=0 - it's case sensitive (at least in the unix
> world)

It's case sensitive, because it goes into ENV['VERSION'], without
embellishment,
inside Ruby...
Luma (Guest)
on 2009-03-21 23:11
(Received via mailing list)
thanks!
Frederick C. (Guest)
on 2009-03-21 23:27
(Received via mailing list)
On Mar 21, 9:01 pm, Phlip <removed_email_address@domain.invalid> wrote:
> > That should be VERSION=0 - it's case sensitive (at least in the unix
> > world)
>
> It's case sensitive, because it goes into ENV['VERSION'], without embellishment,
> inside Ruby...

ENV isn't a hash though so ENV[] can do whatever it wants (perhaps if
that was the norm for the platform in question - i don't know enough
about windows to comment). The ENV_IGNORECASE #define in the ruby
source seems particularly relevant.

Fred
This topic is locked and can not be replied to.