Built motion from commit c56b56e.|0.0.125
[motion.git] / server / migrations / 20160404155902-motion.js
index ac5f94e..70af150 100644 (file)
@@ -1 +1,29 @@
-var _0xfc8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x6E\x61\x6D\x65","\x55\x4E\x49\x51\x55\x45","\x61\x64\x64\x49\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x49\x6E\x64\x65\x78"];_0xfc8a[0];module[_0xfc8a[1]]= {up:function(_0x9fd5x1,_0x9fd5x2){_0x9fd5x1[_0xfc8a[5]](_0xfc8a[2],[_0xfc8a[3]],{unique:true,indicesType:_0xfc8a[4],indexName:_0xfc8a[3]})},down:function(_0x9fd5x1,_0x9fd5x2){_0x9fd5x1[_0xfc8a[6]](_0xfc8a[2],_0xfc8a[3])}}
\ No newline at end of file
+'use strict';
+
+module.exports = {
+  up: function(queryInterface, Sequelize) {
+    /*
+      Add altering commands here.
+      Return a promise to correctly handle asynchronicity.
+
+      Example:
+      return queryInterface.createTable('users', { id: Sequelize.INTEGER });
+    */
+    queryInterface.addIndex('dashboards', ['name'], {
+      unique: true,
+      indicesType: 'UNIQUE',
+      indexName: 'name'
+    });
+  },
+
+  down: function(queryInterface, Sequelize) {
+    /*
+      Add reverting commands here.
+      Return a promise to correctly handle asynchronicity.
+
+      Example:
+      return queryInterface.dropTable('users');
+    */
+    queryInterface.removeIndex('dashboards', 'name');
+  }
+};