I can't figure out how to make new columns such as title and image.
- What can you not figure out? What file to modify, what to type in that file, how to migrate the database, what?
- Please post a link to the exercise you're stuck on so we can look at the exercise ourselves
@zystvan, here is the link : [https://www.codecademy.com/courses/learn-rails/lessons/one-many/exercises/one-many-models-ii]
It will also probably help @zystvan out if you post your code and the error that your code brought up so he can help you faster and give you a better response.
I have the exact same difficulties
here is the exercise text :
"Now that there's an association between Tag and Destination, let's continue and add columns to the migration files.
Open the migration file in db/migrate/ for the tags table, and add the following columns:
a string column called title a string column called image "
Here is my code :
The exercise ask us to create new column of "string" type.. and i don't remember what to do
create_table part creates a database table, and
t is an iterator that lets you create a column. So, the syntax to create a column that stores a string would be:
If you wanted to store a title for something, that look like this:
Thanks that's perfect
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.