On Monday, August 20, 2012 12:21:44 PM UTC+1, Yongning Liang wrote:
>
> Hey guys, 
> I'm new to rails, and I using rails 3.2.8, follow this guide 
> http://guides.rubyonrails.org/migrations.html#creating-a-standalone-migration,
>  
> I type
>
>> > rails generate migration AddOriginCreatorToTags
>
> in my terminal and got
>
>> invoke  active_record
>> create    db/migrate/20120820095010_add_original_creator_to_tags.rb
>
> but I can't find
>
>> add_column :tags, :origin_creator, :string 
>
> in  20120820095010_add_original_creator_to_tags.rb
>
>
It doesn't infer the columns to add from the migration name - you have to 
specify those . In your case that would be

rails generate migration AddOriginCreatorToTags origin_creator:string

Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/LxkWDyYCofwJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to