foreign key sequelize mysql code example Example: sequelize create record with foreign key constraint Project.belongsTo(User, {foreignKey: 'user_id'})