Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Conversation

@gfzabarino
Copy link

  • Upgraded sequelize to 2.0.0-rc2.
  • Changed database schema to use the createTable method when possible and changed all camel case names to underscore.
  • Changed all models to have the 'field' attribute set to indicate the real name of fields in the database (and still be able to use camel case names on js).
  • Added of a function to controllerHelper.js to convert values to its underscored version. This is used by the getAll method, since apparently sequilize is not respecting the field attribute in some cases.
  • Changed all enums values to uppercase.
  • Explicitely included createdAt and updatedAt attribtues with their own 'field' setting because model tests were not passing.
  • Not working because the hasMany association doesn't respect the foreignKey set in the belongsTo side. It currently inserts its own key, such as ChallengeId (this is happening for files).

- Changed database schema to use the createTable method when possible and changed all camel case names to underscore.
- Changed all models to have the 'field' attribute set to indicate the real name of fields in the database (and still be able to use camel case names on js).
- Added of a function to controllerHelper.js to convert values to its underscored version. This is used by the getAll method, since apparently sequilize is not respecting the field attribute in some cases.
- Changed all enums values to uppercase.
- Explicitely included createdAt and updatedAt attribtues with their own 'field' setting because model tests were not passing.
- Not working because the hasMany association doesn't respect the foreignKey set in the belongsTo side. It currently inserts its own key, such as ChallengeId (this is happening for files).
@mahnunchik
Copy link
Contributor

@gfzabarino @indytechcook
Another solution to the problem with createdAt and updatedAt attribtues: #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants