Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_square_history.js
index 295a01d..84118e3 100644 (file)
@@ -5,6 +5,7 @@
 module.exports = function(sequelize, DataTypes) {
 
   var ReportSquareHistory = sequelize.define('ReportSquareHistory', {
+    sourceid: DataTypes.INTEGER,
     network: {
       type: DataTypes.STRING,
     },
@@ -88,7 +89,11 @@ module.exports = function(sequelize, DataTypes) {
       defaultValue: false
     }
   }, {
-    tableName: 'report_square_history'
+    tableName: 'report_square_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
   });
   ReportSquareHistory.removeAttribute('id');
   return ReportSquareHistory;