Add a column in existing table in Rails -


i have table a::b (a namespace) in rails. want add column name in b. writing command :

rails g migration addnametoa::b name:string 

i don't think addnametoa::b right. should command be?

you can use:

rails g migration add_name_to_a_b name:string 

edit #1:

as marek lipka said, string default type so:

rails g migration add_name_to_a_b name 

will work


Comments