Built motion from commit 27e0a5d.|1.0.8
[motion.git] / server / models / index.js
index 67b8bff..03fe202 100644 (file)
@@ -51,7 +51,7 @@ Object.keys(db).forEach(function(modelName) {
 
 db.history = {};
 
-var sequelize_history = new Sequelize(config.db_history.database, config.db_history.username, config.db_history.password, {
+var sequelize_readOnly = new Sequelize(config.db_history.database, config.db_history.username, config.db_history.password, {
   host: config.db_history.host,
   dialect: 'mysql',
   timezone: config.timezone || moment().format("Z"),
@@ -69,7 +69,7 @@ fs
       (file.indexOf(".") !== 0) && (file.indexOf('.spec.') === -1) && (file !== "index.js");
   })
   .forEach(function(file) {
-    var model = sequelize_history["import"](path.join(__dirname, 'history', file));
+    var model = sequelize["import"](path.join(__dirname, 'history', file));
     db.history[model.name] = model;
   });
 
@@ -81,7 +81,7 @@ Object.keys(db.history).forEach(function(modelName) {
 });
 
 db.sequelize = sequelize;
-db.sequelize_history = sequelize_history;
+db.sequelize_readOnly = sequelize_readOnly;
 db.Sequelize = Sequelize;
 
 module.exports = db;