summaryrefslogtreecommitdiff
path: root/lib/migrations/20171009121200-longtext-for-mysql.js
blob: cb9fc8a5ca8d4b0a7847af93dd63666bc40834ae (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 })
  }
}