Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_fax_history.js
index 0e9194f..d6fc1ee 100644 (file)
@@ -4,6 +4,7 @@ var moment = require('moment');
 
 module.exports = function(sequelize, DataTypes) {
   var ReportFaxHistory = sequelize.define('ReportFaxHistory', {
+    sourceid: DataTypes.INTEGER,
     uniqueid: DataTypes.STRING,
     timeslot: DataTypes.INTEGER,
     accountid: DataTypes.STRING,
@@ -29,7 +30,11 @@ module.exports = function(sequelize, DataTypes) {
     connectedAt: DataTypes.DATE,
     from: DataTypes.STRING
   }, {
-    tableName: 'report_fax_history'
+    tableName: 'report_fax_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
   });
   ReportFaxHistory.removeAttribute('id');
   return ReportFaxHistory;