summaryrefslogtreecommitdiff
path: root/lib/migrations/20171009121200-longtext-for-mysql.js
blob: 2a7d0d3aa6a87d7a91fe664d37e318c72065c85a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict'
module.exports = {
  up: function (queryInterface, Sequelize) {
    queryInterface.changeColumn('Notes', 'content', {type: Sequelize.TEXT('long')})
    queryInterface.changeColumn('Revisions', 'patch', {type: Sequelize.TEXT('long')})
    queryInterface.changeColumn('Revisions', 'content', {type: Sequelize.TEXT('long')})
    queryInterface.changeColumn('Revisions', 'lastContent', {type: Sequelize.TEXT('long')})
  },

  down: function (queryInterface, Sequelize) {
    queryInterface.changeColumn('Notes', 'content', {type: Sequelize.TEXT})
    queryInterface.changeColumn('Revisions', 'patch', {type: Sequelize.TEXT})
    queryInterface.changeColumn('Revisions', 'content', {type: Sequelize.TEXT})
    queryInterface.changeColumn('Revisions', 'lastContent', {type: Sequelize.TEXT})
  }
}