Ruby Active Record Associations in Rails More Association Options A Migration for a Polymorphic Association

Nicolás Melgarejo
Nicolás Melgarejo
11,490 Points

Hi Community! I can't understand what is wrong in my code

bin/rails g migration AddVehicleToPart vehicle_id:integer vehicle_type:string

1 Answer

The error message you receive is:

Bummer: You're adding a column to an existing table, so it's conventional for the migration name to end with the name of the table you're adding a column to. (The table name should be capitalized when it's part of a migration name.)

From the instructions the name of the table is parts. You are missing the s at the end: AddVehicleToParts.