codimd/lib/migrations/20171009121200-longtext-for-mysql.ts
Raccoon 147c20064f
ts: all migrations
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:28 +08:00

16 lines
843 B
TypeScript

export = {
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})
}
}