feat(server): immich checksum header (#9229)

* feat: dedupe by checksum header

* chore: open api
This commit is contained in:
Jason Rasmussen 2024-05-02 15:42:26 -04:00 committed by GitHub
parent 16706f7f49
commit ec4eb7cd19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 165 additions and 19 deletions

View file

@ -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",