changed model logging

This commit is contained in:
bill bittner 2017-07-12 16:57:12 -07:00
parent 99c7c84cfb
commit 45ce1c44c6
4 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -46,7 +46,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {
);
File.associate = db => {
console.log('test');
File.hasMany(db.Request);
};

View file

@ -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);
}
});

View file

@ -26,7 +26,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {
);
Request.associate = db => {
console.log('test');
Request.belongsTo(db.File, {
onDelete : 'cascade',
foreignKey: {