1 import * as Sequelize from 'sequelize'
3 async function up (utils: {
4 transaction: Sequelize.Transaction
5 queryInterface: Sequelize.QueryInterface
6 sequelize: Sequelize.Sequelize
8 // waitingTranscoding column
11 type: Sequelize.BOOLEAN,
15 await utils.queryInterface.addColumn('video', 'waitTranscoding', data)
19 const query = 'UPDATE video SET "waitTranscoding" = false'
20 await utils.sequelize.query(query)
25 type: Sequelize.BOOLEAN,
29 await utils.queryInterface.changeColumn('video', 'waitTranscoding', data)
35 type: Sequelize.INTEGER,
39 await utils.queryInterface.addColumn('video', 'state', data)
44 const query = 'UPDATE video SET "state" = 1'
45 await utils.sequelize.query(query)
50 type: Sequelize.INTEGER,
54 await utils.queryInterface.changeColumn('video', 'state', data)
58 function down (options) {
59 throw new Error('Not implemented.')