diff options
author | Pedro Ferreira | 2017-07-10 20:09:59 +0200 |
---|---|---|
committer | Pedro Ferreira | 2018-03-26 15:55:39 +0200 |
commit | 34df7ccce83bebec1db3b6995eb25cb6fe4fdbd4 (patch) | |
tree | 0b20a9c3f4135e9a74cff117793fef77a772f823 /lib/migrations | |
parent | 40b385570291278f44806446f702ee61e1382805 (diff) |
Use TEXT instead of STRING for tokens
Signed-off-by: Pedro Ferreira <pedro.ferreira@cern.ch>
Diffstat (limited to 'lib/migrations')
-rw-r--r-- | lib/migrations/20180326103000-use-text-in-tokens.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/migrations/20180326103000-use-text-in-tokens.js b/lib/migrations/20180326103000-use-text-in-tokens.js new file mode 100644 index 00000000..f9507747 --- /dev/null +++ b/lib/migrations/20180326103000-use-text-in-tokens.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = { + up: function (queryInterface, Sequelize) { + return queryInterface.changeColumn('Users', 'accessToken', { + type: Sequelize.TEXT + }).then(function () { + return queryInterface.changeColumn('Users', 'refreshToken', { + type: Sequelize.TEXT + }) + }) + }, + + down: function (queryInterface, Sequelize) { + return queryInterface.changeColumn('Users', 'accessToken', { + type: Sequelize.STRING + }).then(function () { + return queryInterface.changeColumn('Users', 'refreshToken', { + type: Sequelize.STRING + }) + }) + } +} |