summaryrefslogtreecommitdiff
path: root/lib/migrations/20160112220142-note-add-lastchange.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations/20160112220142-note-add-lastchange.js')
-rw-r--r--lib/migrations/20160112220142-note-add-lastchange.js19
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')
+ })
+ }
+}