Answer the question
In order to leave comments, you need to log in
Rail creating migration automatically?
Hello. Is there a possibility in Rails with the name of the migration to generate the contents of the file to change the field or remove the field? For example, if you create a migration
rails generate migration AddPriceToProducts price:decimal{15,5}
add_column :products, :price, :decimal, precision: 15, scale: 5
Answer the question
In order to leave comments, you need to log in
Removal? Certainly.
rails g migration remove_category_id_from_posts category_id:integer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question