Skip to content

Commit

Permalink
fix(deps): updated Sequelize. Fixes MEMB-520
Browse files Browse the repository at this point in the history
  • Loading branch information
serge1peshcoff committed Aug 11, 2019
1 parent 28e7271 commit 028983f
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 267 deletions.
7 changes: 6 additions & 1 deletion models/Category.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const Category = sequelize.define('category', {
}
},
}
}, { underscored: true, tableName: 'categories' });
}, {
underscored: true,
tableName: 'categories',
createdAt: 'created_at',
updatedAt: 'updated_at'
});

module.exports = Category;
7 changes: 6 additions & 1 deletion models/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const Code = sequelize.define('code', {
claimed_by: {
type: Sequelize.INTEGER
}
}, { underscored: true, tableName: 'codes' });
}, {
underscored: true,
tableName: 'codes',
createdAt: 'created_at',
updatedAt: 'updated_at'
});

module.exports = Code;
7 changes: 6 additions & 1 deletion models/Integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const Integration = sequelize.define('integration', {
description: {
type: Sequelize.TEXT
}
}, { underscored: true, tableName: 'integrations' });
}, {
underscored: true,
tableName: 'integrations',
createdAt: 'created_at',
updatedAt: 'updated_at'
});

module.exports = Integration;
4 changes: 2 additions & 2 deletions models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Integration = require('./Integration');
const Code = require('./Code');
const Category = require('./Category');

Integration.hasMany(Code);
Code.belongsTo(Integration);
Integration.hasMany(Code, { foreignKey: 'integration_id' });
Code.belongsTo(Integration, { foreignKey: 'integration_id' });

module.exports = {
Integration,
Expand Down
Loading

0 comments on commit 028983f

Please sign in to comment.