Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
To make our app truly social, we need to add a model to represent the relationship between two users. We'll do this with a new model that has two foreign keys, both of which point back to the `User` model.
New terms
-
indexes
- A list of indexes to create on the model. These could be fields to index for faster searches or, as in our case, fields to make unique. More information -
.join()
- A query that references another table or another query.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up