mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: asset metadata (#20446)
This commit is contained in:
parent
25a94bd117
commit
88072910da
37 changed files with 1999 additions and 21 deletions
|
|
@ -19,6 +19,33 @@ returning
|
|||
"dateTimeOriginal",
|
||||
"timeZone"
|
||||
|
||||
-- AssetRepository.getMetadata
|
||||
select
|
||||
"key",
|
||||
"value",
|
||||
"updatedAt"
|
||||
from
|
||||
"asset_metadata"
|
||||
where
|
||||
"assetId" = $1
|
||||
|
||||
-- AssetRepository.getMetadataByKey
|
||||
select
|
||||
"key",
|
||||
"value",
|
||||
"updatedAt"
|
||||
from
|
||||
"asset_metadata"
|
||||
where
|
||||
"assetId" = $1
|
||||
and "key" = $2
|
||||
|
||||
-- AssetRepository.deleteMetadataByKey
|
||||
delete from "asset_metadata"
|
||||
where
|
||||
"assetId" = $1
|
||||
and "key" = $2
|
||||
|
||||
-- AssetRepository.getByDayOfYear
|
||||
with
|
||||
"res" as (
|
||||
|
|
|
|||
|
|
@ -539,6 +539,37 @@ where
|
|||
order by
|
||||
"asset_face"."updateId" asc
|
||||
|
||||
-- SyncRepository.assetMetadata.getDeletes
|
||||
select
|
||||
"asset_metadata_audit"."id",
|
||||
"assetId",
|
||||
"key"
|
||||
from
|
||||
"asset_metadata_audit" as "asset_metadata_audit"
|
||||
left join "asset" on "asset"."id" = "asset_metadata_audit"."assetId"
|
||||
where
|
||||
"asset_metadata_audit"."id" < $1
|
||||
and "asset_metadata_audit"."id" > $2
|
||||
and "asset"."ownerId" = $3
|
||||
order by
|
||||
"asset_metadata_audit"."id" asc
|
||||
|
||||
-- SyncRepository.assetMetadata.getUpserts
|
||||
select
|
||||
"assetId",
|
||||
"key",
|
||||
"value",
|
||||
"asset_metadata"."updateId"
|
||||
from
|
||||
"asset_metadata" as "asset_metadata"
|
||||
inner join "asset" on "asset"."id" = "asset_metadata"."assetId"
|
||||
where
|
||||
"asset_metadata"."updateId" < $1
|
||||
and "asset_metadata"."updateId" > $2
|
||||
and "asset"."ownerId" = $3
|
||||
order by
|
||||
"asset_metadata"."updateId" asc
|
||||
|
||||
-- SyncRepository.authUser.getUpserts
|
||||
select
|
||||
"id",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue