you have to create a new migration for add_column using rails g migration col_name_table_name in that migration file you have to follow below syntax
def up add_column : table_name, column_name, data_type end i hope its help to you.. On Tue, Oct 23, 2012 at 8:19 PM, roelof <[email protected]> wrote: > Hello, > > I try to add a column named id_category to my database table berichten. > So I have this : > > class Bericht < ActiveRecord::Migration > def up > add_column :berichten do [t] > t.column :name, 'id_category' > end > end > def down > end > end > > But I get wrong number ( 1 of 3 ) error message. > > Can anyone tell me what's wrong here so I can learn to write my own > migrations. > > Roelof > > -- > 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/-/_J0oNDSxy9QJ. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.

