X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fmigrations%2F0080-video-channels.ts;h=5512bdcf1593a739ddd4d6b9e1e994fba337aecb;hb=1735c825726edaa0af5035cb6cbb0cc0db502c6d;hp=f197215176c14d876b0767e1f7887f4424933f4d;hpb=53abc4c272be9ecc951274458d054dbaf86e594d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/migrations/0080-video-channels.ts b/server/initializers/migrations/0080-video-channels.ts index f19721517..5512bdcf1 100644 --- a/server/initializers/migrations/0080-video-channels.ts +++ b/server/initializers/migrations/0080-video-channels.ts @@ -69,12 +69,12 @@ async function up (utils: { const options = { type: Sequelize.QueryTypes.SELECT } - const rawVideos = await utils.sequelize.query(query, options) + const rawVideos = await utils.sequelize.query(query, options) as any for (const rawVideo of rawVideos) { const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId } }) - const video = await utils.db.Video.findById(rawVideo.id) + const video = await utils.db.Video.findByPk(rawVideo.id) video.channelId = videoChannel.id await video.save() }