Muhammad sharifi4,454 Points
anyone can tell me the correct command?
We need to be able to specify that a Part model belongs to either a Car or a Truck (which we will refer to as "vehicles"). Assume that cars and parts tables already exist. Here at the command line, generate a migration that will add vehicle_id and vehicle_type columns to the parts table.
Steve HunterTreehouse Moderator 56,146 Points
For this you you need to use the
rails generate command to create a
migration. To tell the framework which table to modify, you can use title case to say, for example,
Example is the table you are adding the columns to.
Next, specify the name of the column and the data type, separated by a colon. You're given these in the question. There's
vehicle_id which we can assume is an
vehicle_type which I called a
Tying all that together and you should get through the challenge