Re: add to migration not working (Rails 2.0.2)

Chris
2008-04-16T17:16:31Z

I thought calling db:migrate was supposed to automatically update the
model.

On Apr 12, 1:40 am, Craig White
<craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org>
wrote:
> On Fri, 2008-04-11 at 22:09 -0700, Joe Lewis wrote:
> > I''m experiencing the same issue. script/generatemigrationis
stubbing
> > themigration, minus the column info that i''m specifying.
Here''s what
> > I did in the Terminal:
>
> > $ ruby script/generatemigrationAddPrimaryPlatformInfo os:string
> > hardware:string
> >       exists  db/migrate
> >       create  db/migrate/005_add_primary_platform_info.rb
>
> > My 005_add_primary_platform_info.rb file then has:
>
> > class AddPrimaryPlatformInfo < ActiveRecord::Migration
> >   def self.up
> >   end
>
> >   def self.down
> >   end
> > end
>
> ----
> if you did...
>
> script/generate model SomeNewModel
>
> you would get the base ''add table/column'' stuff inserted
>
> Craig