refactor: dedicated query for asset migration job (#17631)

This commit is contained in:
Daniel Dietzler
2025-04-15 21:49:15 +02:00
committed by GitHub
parent 26f0ea4cb5
commit 21becbf1b0
6 changed files with 54 additions and 9 deletions

View File

@@ -77,6 +77,16 @@ export class AssetJobRepository {
.stream();
}
@GenerateSql({ params: [DummyValue.UUID] })
getForMigrationJob(id: string) {
return this.db
.selectFrom('assets')
.select(['assets.id', 'assets.ownerId', 'assets.encodedVideoPath'])
.select(withFiles)
.where('assets.id', '=', id)
.executeTakeFirst();
}
private storageTemplateAssetQuery() {
return this.db
.selectFrom('assets')