Built motion from commit (unavailable).|2.4.6
[motion2.git] / server / migrations / 2.0.21.js
index b5f0c07..b3c2ed4 100644 (file)
@@ -4,78 +4,78 @@ var BPromise = require('bluebird');
 var logger = require('../config/logger')('migration');
 
 var Migration = function(queryInterface) {
-    this.queryInterface = queryInterface;
+  this.queryInterface = queryInterface;
 };
 
 Migration.prototype.addColumn = function(table, column, type) {
-    return this.queryInterface
-        .addColumn(table, column, type)
-        .then(function(res) {
-            logger.info('Added column %s to %s', column, table);
-        })
-        .catch(function(err) {
-            logger.info(JSON.stringify(err));
-        });
+  return this.queryInterface
+    .addColumn(table, column, type)
+    .then(function(res) {
+      logger.info('Added column %s to %s', column, table);
+    })
+    .catch(function(err) {
+      logger.info(JSON.stringify(err));
+    });
 
 };
 
 Migration.prototype.removeColumn = function(table, column) {
-    return this.queryInterface
-        .removeColumn(table, column)
-        .then(function(res) {
-            logger.info('Removed column %s from %s', column, table);
-        })
-        .catch(function(err) {
-            logger.info(JSON.stringify(err));
-        });
+  return this.queryInterface
+    .removeColumn(table, column)
+    .then(function(res) {
+      logger.info('Removed column %s from %s', column, table);
+    })
+    .catch(function(err) {
+      logger.info(JSON.stringify(err));
+    });
 
 };
 
 Migration.prototype.renameColumn = function(table, oldColumn, newColumn) {
-    return this.queryInterface
-        .renameColumn(table, oldColumn, newColumn)
-        .then(function(res) {
-            logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table);
-        })
-        .catch(function(err) {
-            logger.info(JSON.stringify(err));
-        });
+  return this.queryInterface
+    .renameColumn(table, oldColumn, newColumn)
+    .then(function(res) {
+      logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table);
+    })
+    .catch(function(err) {
+      logger.info(JSON.stringify(err));
+    });
 };
 
 Migration.prototype.dropTable = function(table) {
-    return this.queryInterface
-        .dropTable(table)
-        .then(function(res) {
-            logger.info('table dropped %s', table);
-        })
-        .catch(function(err) {
-            logger.info(JSON.stringify(err));
-        });
+  return this.queryInterface
+    .dropTable(table)
+    .then(function(res) {
+      logger.info('table dropped %s', table);
+    })
+    .catch(function(err) {
+      logger.info(JSON.stringify(err));
+    });
 };
 
 module.exports = {
 
-    up: function(queryInterface, Sequelize) {
-        var migration = new Migration(queryInterface);
+  up: function(queryInterface, Sequelize) {
+    var migration = new Migration(queryInterface);
 
-        migration.dropTable('jscripty_projects', {
-            force: true
-        });
+    migration.dropTable('jscripty_projects', {
+      force: true
+    });
 
-        migration.dropTable('report_jscripty_inputs', {
-            force: true
-        });
+    migration.dropTable('report_jscripty_inputs', {
+      force: true
+    });
 
-        migration.dropTable('report_jscripty_questions', {
-            force: true
-        });
+    migration.dropTable('report_jscripty_questions', {
+      force: true
+    });
 
-        migration.dropTable('report_jscripty_sessions', {
-            force: true
-        });
-    },
+    migration.dropTable('report_jscripty_sessions', {
+      force: true
+    });
+  },
 
-    down: function(queryInterface, Sequelize) {
+  down: function(queryInterface, Sequelize) {
 
-    }
-};
\ No newline at end of file
+  }
+};