Преглед изворни кода

Add migration for new showDescriptions setting

sbkwgh пре 8 година
родитељ
комит
8194bf12f2
1 измењених фајлова са 14 додато и 0 уклоњено
  1. 14 0
      migrations/20170927123720-add-show-description-column.js

+ 14 - 0
migrations/20170927123720-add-show-description-column.js

@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = {
+  up: (queryInterface, Sequelize) => {
+    return queryInterface.addColumn('settings', 'showDescription', {
+      type: Sequelize.BOOLEAN,
+      defaultValue: false
+    })
+  },
+
+  down: (queryInterface, Sequelize) => {
+    return queryInterface.dropColumn('settings', 'showDescription')
+  }
+};