Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_openchannel_history.js
index a77d3df..132f2db 100644 (file)
@@ -7,8 +7,10 @@ var moment = require('moment');
 module.exports = function(sequelize, DataTypes) {
 
   var ReportOpenchannelHistory = sequelize.define('ReportOpenchannelHistory', {
+    sourceid: DataTypes.INTEGER,
     uniqueid: DataTypes.STRING,
     timeslot: DataTypes.INTEGER,
+    from: DataTypes.STRING,
     accountid: DataTypes.STRING,
     accountname: DataTypes.STRING,
     application: DataTypes.STRING,
@@ -30,7 +32,11 @@ module.exports = function(sequelize, DataTypes) {
     rejectedAt: DataTypes.DATE,
     connectedAt: DataTypes.DATE
   }, {
-    tableName: 'report_openchannel_history'
+    tableName: 'report_openchannel_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
   });
   ReportOpenchannelHistory.removeAttribute('id');
   return ReportOpenchannelHistory;