changed model logging
This commit is contained in:
parent
99c7c84cfb
commit
45ce1c44c6
4 changed files with 7 additions and 3 deletions
|
@ -154,10 +154,16 @@ module.exports = {
|
|||
createdAt: {
|
||||
gt: startDate,
|
||||
},
|
||||
FileId: {
|
||||
not: null,
|
||||
},
|
||||
},
|
||||
include: [db.File],
|
||||
})
|
||||
.then(data => {
|
||||
if (data) {
|
||||
logger.debug(data[0].File.name);
|
||||
}
|
||||
// let resultHashTable = {};
|
||||
// let sortableArray = [];
|
||||
// let sortedArray;
|
||||
|
|
|
@ -46,7 +46,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {
|
|||
);
|
||||
|
||||
File.associate = db => {
|
||||
console.log('test');
|
||||
File.hasMany(db.Request);
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ fs
|
|||
|
||||
Object.keys(db).forEach(modelName => {
|
||||
if (db[modelName].associate) {
|
||||
logger.verbose('associating', modelName);
|
||||
logger.info('Associating model:', modelName);
|
||||
db[modelName].associate(db);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,7 +26,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {
|
|||
);
|
||||
|
||||
Request.associate = db => {
|
||||
console.log('test');
|
||||
Request.belongsTo(db.File, {
|
||||
onDelete : 'cascade',
|
||||
foreignKey: {
|
||||
|
|
Loading…
Reference in a new issue