Thinkful-Ed / node-sql-sequelize-lessons

Extension work on SQL and Sequelize for Thinkful's Node course
https://courses.thinkful.com/node-sql-001v1/unit/1
1 stars 4 forks source link

User-submitted feedback for 1.2.2 #16

Open coach-t opened 7 years ago

coach-t commented 7 years ago

Hello! Happy 4th of July.

It looks like Sequelize is now on v4. instanceMethod and classMethod are no longer valid. http://docs.sequelizejs.com/manual/tutorial/upgrade-to-v4.html

I was able to get my app to work with just a couple of minor changes. Basically, I removed classMethod and instanceMethod from the options object and made them methods for the model, if that makes sense. Here's an example of one of my Sequelize models on v4 (4.2.1, specifically). https://github.com/Ljyockey/hospitalert-api/blob/master/models/user.js

Students may run into issues when they work on the final assignment as NPM will automatically install v4 and as of right now there don't seem to be a lot of examples on the v4 changes aside from the official Sequelize docs. Just thought I'd point it out..Have a great day! :)

Curriculum url: https://courses.thinkful.com/node-sql-001v1/assignment/1.2.2 UUID: 81c373e0-e895-11e6-a3eb-03934004d1da