I currently have migration called Products, and I simply want to add few more strings to this migration such as description and product type. What is the best way to do this?
class CreateProducts < ActiveRecord::Migration
def change
create_table :products do |t|
t.string :name
t.decimal :price
t.text :description
t.timestamps
end
end
end
Just run
rails g migration add_description_to_products description:string
rails g migration add_product_type_to_products product_type:string
and then run
rake db:migrate