From 6f14822413eeb43aae1298163699f87bc1ce11e7 Mon Sep 17 00:00:00 2001 From: BoHong Li Date: Mon, 27 Mar 2017 19:23:00 +0800 Subject: fix: Add missing migration --- lib/migrations/20160112220142-note-add-lastchange.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/migrations/20160112220142-note-add-lastchange.js (limited to 'lib/migrations/20160112220142-note-add-lastchange.js') diff --git a/lib/migrations/20160112220142-note-add-lastchange.js b/lib/migrations/20160112220142-note-add-lastchange.js new file mode 100644 index 00000000..b4e111b3 --- /dev/null +++ b/lib/migrations/20160112220142-note-add-lastchange.js @@ -0,0 +1,19 @@ +'use strict' +module.exports = { + up: function (queryInterface, Sequelize) { + return queryInterface.addColumn('Notes', 'lastchangeuserId', { + type: Sequelize.UUID + }).then(function () { + return queryInterface.addColumn('Notes', 'lastchangeAt', { + type: Sequelize.DATE + }) + }) + }, + + down: function (queryInterface, Sequelize) { + return queryInterface.removeColumn('Notes', 'lastchangeAt') + .then(function () { + return queryInterface.removeColumn('Notes', 'lastchangeuserId') + }) + } +} -- cgit v1.2.3