mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server): immich checksum header (#9229)
* feat: dedupe by checksum header * chore: open api
This commit is contained in:
parent
16706f7f49
commit
ec4eb7cd19
17 changed files with 165 additions and 19 deletions
|
|
@ -473,6 +473,30 @@ WHERE
|
|||
LIMIT
|
||||
1
|
||||
|
||||
-- AssetRepository.getUploadAssetIdByChecksum
|
||||
SELECT DISTINCT
|
||||
"distinctAlias"."AssetEntity_id" AS "ids_AssetEntity_id"
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
"AssetEntity"."id" AS "AssetEntity_id"
|
||||
FROM
|
||||
"assets" "AssetEntity"
|
||||
LEFT JOIN "libraries" "AssetEntity__AssetEntity_library" ON "AssetEntity__AssetEntity_library"."id" = "AssetEntity"."libraryId"
|
||||
WHERE
|
||||
(
|
||||
("AssetEntity"."ownerId" = $1)
|
||||
AND ("AssetEntity"."checksum" = $2)
|
||||
AND (
|
||||
(("AssetEntity__AssetEntity_library"."type" = $3))
|
||||
)
|
||||
)
|
||||
) "distinctAlias"
|
||||
ORDER BY
|
||||
"AssetEntity_id" ASC
|
||||
LIMIT
|
||||
1
|
||||
|
||||
-- AssetRepository.getWithout (sidecar)
|
||||
SELECT
|
||||
"AssetEntity"."id" AS "AssetEntity_id",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue