Skip to content

Commit

Permalink
SQL fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Aug 6, 2021
1 parent e65bba1 commit 93789a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Damselfly.Core/Services/ImageRecognitionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ public async Task MarkFolderForScan(Folder folder)
using var db = new ImageContext();

// TODO: Abstract this once EFCore Bulkextensions work in efcore 6
await db.Database.ExecuteSqlInterpolatedAsync($"Update imagemetadata Set AILastUpdated = null where imageid in (select imageid from folders where folderid = {folder.FolderId})");
await db.Database.ExecuteSqlInterpolatedAsync($"Update imagemetadata Set AILastUpdated = null where imageid in (select imageid from images where folderid = {folder.FolderId})");

_statusService.StatusText = $"Folder {folder.Name} flagged for AI reprocessing.";
}
Expand Down
2 changes: 1 addition & 1 deletion Damselfly.Core/Services/ThumbnailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public async Task MarkFolderForScan(Folder folder)
using var db = new ImageContext();

// TODO: Abstract this once EFCore Bulkextensions work in efcore 6
await db.Database.ExecuteSqlInterpolatedAsync($"Update imagemetadata Set ThumbLastUpdated = null where imageid in (select imageid from folders where folderid = {folder.FolderId})");
await db.Database.ExecuteSqlInterpolatedAsync($"Update imagemetadata Set ThumbLastUpdated = null where imageid in (select imageid from images where folderid = {folder.FolderId})");

_statusService.StatusText = $"Folder {folder.Name} flagged for thumbnail re-generation.";
}
Expand Down

0 comments on commit 93789a7

Please sign in to comment.