Skip to content

Commit

Permalink
fix(database): removed unnecessary foreign key specification
Browse files Browse the repository at this point in the history
  • Loading branch information
mvegter committed May 20, 2020
1 parent 078d3ac commit 3d657bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/database/models/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ module.exports = (sequelize, Sequelize) => {

Log.associate = (models) => {
Log.belongsTo(models.User, { as: 'user' });
Log.belongsTo(models.Log, { foreignKey: 'root_log_id', as: 'rootLogs' });
Log.belongsTo(models.Log, { foreignKey: 'parent_log_id', as: 'parentLog' });
Log.belongsTo(models.Log, { as: 'rootLog' });
Log.belongsTo(models.Log, { as: 'parentLog' });

Log.belongsToMany(models.Run, { through: 'log_runs' });
Log.belongsToMany(models.Tag, { as: 'tags', through: 'log_tags' });
Expand Down

0 comments on commit 3d657bf

Please sign in to comment.