diff options
author | Raccoon | 2017-03-28 16:48:30 +0800 |
---|---|---|
committer | GitHub | 2017-03-28 16:48:30 +0800 |
commit | 0b4dac74ed8c0da66c340add45ce78a067c69ee9 (patch) | |
tree | 3fd13e29ae3520bdb6a2e5ec061aca1094047d7c /lib/migrations/20160112220142-note-add-lastchange.js | |
parent | b2985085d011cad374c76ae75f548fdefb15c258 (diff) | |
parent | e46874d04a4974ddb655962b6da8afb2928bc991 (diff) |
Merge pull request #406 from hackmdio/feature/add_missing_migration
fix: Add missing migration
Diffstat (limited to 'lib/migrations/20160112220142-note-add-lastchange.js')
-rw-r--r-- | lib/migrations/20160112220142-note-add-lastchange.js | 19 |
1 files changed, 19 insertions, 0 deletions
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') + }) + } +} |