🗑️ Clean up the cloud file table unused fields

This commit is contained in:
2026-01-11 23:58:37 +08:00
parent de1175bdc7
commit 6d5303f99c
9 changed files with 26 additions and 11 deletions

View File

@@ -314,9 +314,12 @@ public class BroadcastEventHandler(
await scopedDb.Files.Where(f => f.Id == fileId).ExecuteUpdateAsync(setter => setter
.SetProperty(f => f.UploadedAt, now)
.SetProperty(f => f.PoolId, destPool)
.SetProperty(f => f.MimeType, newMimeType)
.SetProperty(f => f.HasCompression, hasCompression)
.SetProperty(f => f.HasThumbnail, hasThumbnail)
);
await scopedDb.FileObjects.Where(fo => fo.Id == fileId).ExecuteUpdateAsync(setter => setter
.SetProperty(fo => fo.MimeType, newMimeType)
.SetProperty(fo => fo.HasCompression, hasCompression)
.SetProperty(fo => fo.HasThumbnail, hasThumbnail)
);
// Only delete temp file after successful upload and db update