summaryrefslogtreecommitdiff
path: root/lib/migrations/20180326103000-use-text-in-tokens.js
blob: f950774780bbad36809f8e1fb3c457aea0260faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
      })
    })
  }
}