Answers for "rails g migration rename table"

5

rails g migration add columns

$ rails generate migration AddDetailsToProducts part_number:string price:decimal
Posted by: Guest on August-11-2020
0

rails g migration foreign key optionnal

#MODEL
belongs_to :author, optional: true

#MIGRATION
t.references :author, foreign_key: true
Posted by: Guest on February-04-2021

Browse Popular Code Answers by Language