1 import * as Sequelize from 'sequelize'
3 async function up (utils: {
4 transaction: Sequelize.Transaction
5 queryInterface: Sequelize.QueryInterface
6 sequelize: Sequelize.Sequelize
9 const query = 'DELETE FROM "videoFile" vf1 USING "videoFile" vf2 WHERE vf1.id < vf2.id ' +
10 'AND vf1."videoId" = vf2."videoId" AND vf1.resolution = vf2.resolution AND vf1.fps IS NULL'
11 await utils.sequelize.query(query)
15 const query = 'UPDATE "videoFile" SET fps = -1 WHERE fps IS NULL;'
16 await utils.sequelize.query(query)
21 type: Sequelize.INTEGER,
25 await utils.queryInterface.changeColumn('videoFile', 'fps', data)
30 function down (options) {
31 throw new Error('Not implemented.')