Sfoglia il codice sorgente

Add picture column migration

sbkwgh 7 anni fa
parent
commit
147d0882f0
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      migrations/20171203220305-add-picture-column.js

+ 13 - 0
migrations/20171203220305-add-picture-column.js

@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = {
+  up: (queryInterface, Sequelize) => {
+    return queryInterface.addColumn('users', 'picture', {
+      type: Sequelize.STRING
+    })
+  },
+
+  down: (queryInterface, Sequelize) => {
+    return queryInterface.dropColumn('users', 'picture')
+  }
+};