Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_integration_history.js
index 6062071..0abf869 100644 (file)
@@ -5,6 +5,7 @@
 module.exports = function(sequelize, DataTypes) {
 
   var ReportIntegrationHistory = sequelize.define('ReportIntegrationHistory', {
+    sourceid: DataTypes.INTEGER,
     integration: DataTypes.STRING,
     eventChannel: DataTypes.STRING,
     subtypeChannel: DataTypes.STRING,
@@ -81,9 +82,14 @@ module.exports = function(sequelize, DataTypes) {
     },
     url: DataTypes.STRING,
     app: DataTypes.STRING,
-    appdata: DataTypes.STRING
+    appdata: DataTypes.STRING,
+    projectId: DataTypes.INTEGER
   }, {
-    tableName: 'report_integration_history'
+    tableName: 'report_integration_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
   });
 
   ReportIntegrationHistory.removeAttribute('id');