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

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