Re: rake db:migrate does nothing

Ambrose
Sun, 08 Jul 2007 21:44:32 -0000

Hi Mark

I can absolutely confirm that I cannot get rake db:migrate to apply
more than 3 migrations. It runs with no errors but will only apply the
first 3 migrations on every new project I try. So something is clearly
preventing more than 3 migrations.

Where would I find this environment variable? I''ve looked in
environment.rb and development.rb and database.yml

For now I modified schema.rb from:

ActiveRecord::Schema.define(:version => 3) do

to

ActiveRecord::Schema.define(:version => 5) do

but still the migrations beyond 3 were not applied and the file gets
modified back to:

ActiveRecord::Schema.define(:version => 3) do

after I rake db:migrate

Thanks for your help - this is so frustrating and I''d love to just get
it sorted so I can get on.

Cheers

Ambrose

On Jul 8, 9:39 am, Mark Coleman
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> Ambrose wrote:
> > Yep - all the class names you wrote are as they appear in the
> > migration file.
>
> > All the classes match the file name and are unique.
>
> > The current version in schema.rb:
>
> > ActiveRecord::Schema.define(:version => 3) do
>
> > As I say, if I now create a new project (which I am actually going to
> > do as I am stuffed otherwise) then all the migrations will work. It
> > just seems that after a while it stops applying them for no apparent
> > reason in an existing project.
>
> > Crazy stuff. And very frustrating.
>
> You may have an environment variable called VERSION set at
''3''. This
> would cause rake to migrate to that version but no further. Try manually
> setting the version to 5, to see if that works...
>
> --
> Posted viahttp://www.ruby-forum.com/.