mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
fix: storage template failure after re-upload and previous fail (#16611)
fix: storage template breaks when files are re-uploaded after a move failure
This commit is contained in:
@@ -15,3 +15,22 @@ where
|
||||
"id" = $1
|
||||
returning
|
||||
*
|
||||
|
||||
-- MoveRepository.cleanMoveHistory
|
||||
delete from "move_history"
|
||||
where
|
||||
"move_history"."entityId" not in (
|
||||
select
|
||||
"id"
|
||||
from
|
||||
"assets"
|
||||
where
|
||||
"assets"."id" = "move_history"."entityId"
|
||||
)
|
||||
and "move_history"."pathType" = 'original'
|
||||
|
||||
-- MoveRepository.cleanMoveHistorySingle
|
||||
delete from "move_history"
|
||||
where
|
||||
"move_history"."pathType" = 'original'
|
||||
and "entityId" = $1
|
||||
|
||||
Reference in New Issue
Block a user