Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"redux-thunk": "^2.1.0",
"run-sequence": "^1.0.2",
"sass-loader": "^3.2.1",
"sequelize": "^3.23.3",
"sequelize": "^6.6.5",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading sequelize from v3 to v6 is a major change that introduces numerous breaking changes. The current codebase is incompatible with this new version and will break if this PR is merged as-is. A significant refactoring effort is required.

Here are the critical issues that must be addressed:

1. Incompatible Dependencies:

  • connect-session-sequelize@3.0.0 (line 28) is not compatible with Sequelize v6. It must be upgraded (e.g., to ^7.1.2).
  • sequelize-handlers@0.1.7 (line 91) is an abandoned package that depends on Sequelize v3. It must be removed or replaced.

2. Sequelize API Breaking Changes:

  • Sequelize.Promise is removed: This will cause errors in seed.js:10 and clearDb.js:7. Use native Promises instead.
  • classMethods and instanceMethods are removed: The db.define options for classMethods and instanceMethods were removed in Sequelize v5. This will break all model definitions, for example in server/db/models/Annotations/Annotation/index.js:19-20. These methods need to be refactored.
  • Query Operators Syntax: String-based operators (e.g., $ne) are no longer supported by default. You must use Sequelize.Op symbols. This affects queries like the one in seed.js:256.
  • Association Methods Syntax: The syntax for passing data to through-tables in methods like user.createOrganization (seed.js:111) and team.addStudent (seed.js:246) has changed.
  • Bluebird-specific methods: Methods like .each() are no longer available on Sequelize promises (e.g., seed.js:240). The code should be updated to use standard Promise patterns.

"sequelize-handlers": "^0.1.7",
"serve-favicon": "^2.2.0",
"socket.io": "^1.3.4",
Expand Down