Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed Data Relationships with SQL and Sequelize!
Instruction
Define a One-to-Many Relationship Using Sequelize Associations
Let's start with defining the relationship from the "many" side, by adding a one-to-many association to the Person model.
Note: To get the most out of the instruction steps, be sure to write all of your code and avoid copying/pasting from the examples.
Open the db/models/person.js file. The Person model currently looks like this:
'use strict';
const Sequelize = require('sequelize');
m...