add column in rails

 Use this command on the terminal:

rails generate migration add_fieldname_to_tablename fieldname:string

and

rake db:migrate


rails generate migration add__to_tablename fieldname:string

Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5