HackMD/lib/migrations/20180326103000-use-text-in-tokens.js

24 lines
603 B
JavaScript
Raw Normal View History

'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
})
})
}
}