From baa946968d0b5204c0b7507d10eba95ee643fe4b Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Sun, 15 May 2016 12:20:42 +0800 Subject: Add db migrations for PR #121 --- lib/migrations/20160515114000-user-add-tokens.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/migrations/20160515114000-user-add-tokens.js (limited to 'lib/migrations') diff --git a/lib/migrations/20160515114000-user-add-tokens.js b/lib/migrations/20160515114000-user-add-tokens.js new file mode 100644 index 00000000..3af490a9 --- /dev/null +++ b/lib/migrations/20160515114000-user-add-tokens.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = { + up: function (queryInterface, Sequelize) { + queryInterface.addColumn('Users', 'accessToken', Sequelize.STRING); + queryInterface.addColumn('Users', 'refreshToken', Sequelize.STRING); + return; + }, + + down: function (queryInterface, Sequelize) { + queryInterface.removeColumn('Users', 'accessToken'); + queryInterface.removeColumn('Users', 'refreshToken'); + return; + } +}; \ No newline at end of file -- cgit v1.2.3