mirror of
https://github.com/immich-app/immich.git
synced 2026-02-13 20:37:51 +03:00
merge: remote-tracking branch 'immich/main' into feat/integrity-checks-izzy
This commit is contained in:
@@ -50,9 +50,11 @@ select
|
||||
where
|
||||
"asset"."id" = "tag_asset"."assetId"
|
||||
) as agg
|
||||
) as "tags"
|
||||
) as "tags",
|
||||
to_json("asset_exif") as "exifInfo"
|
||||
from
|
||||
"asset"
|
||||
inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId"
|
||||
where
|
||||
"asset"."id" = $2::uuid
|
||||
limit
|
||||
@@ -224,6 +226,14 @@ from
|
||||
where
|
||||
"asset"."id" = $2
|
||||
|
||||
-- AssetJobRepository.getLockedPropertiesForMetadataExtraction
|
||||
select
|
||||
"asset_exif"."lockedProperties"
|
||||
from
|
||||
"asset_exif"
|
||||
where
|
||||
"asset_exif"."assetId" = $1
|
||||
|
||||
-- AssetJobRepository.getAlbumThumbnailFiles
|
||||
select
|
||||
"asset_file"."id",
|
||||
@@ -483,6 +493,9 @@ select
|
||||
"asset"."fileCreatedAt",
|
||||
"asset_exif"."timeZone",
|
||||
"asset_exif"."fileSizeInByte",
|
||||
"asset_exif"."make",
|
||||
"asset_exif"."model",
|
||||
"asset_exif"."lensModel",
|
||||
(
|
||||
select
|
||||
coalesce(json_agg(agg), '[]')
|
||||
@@ -519,6 +532,9 @@ select
|
||||
"asset"."fileCreatedAt",
|
||||
"asset_exif"."timeZone",
|
||||
"asset_exif"."fileSizeInByte",
|
||||
"asset_exif"."make",
|
||||
"asset_exif"."model",
|
||||
"asset_exif"."lensModel",
|
||||
(
|
||||
select
|
||||
coalesce(json_agg(agg), '[]')
|
||||
|
||||
@@ -1,19 +1,49 @@
|
||||
-- NOTE: This file is auto generated by ./sql-generator
|
||||
|
||||
-- AssetRepository.upsertExif
|
||||
insert into
|
||||
"asset_exif" ("dateTimeOriginal", "lockedProperties")
|
||||
values
|
||||
($1, $2)
|
||||
on conflict ("assetId") do update
|
||||
set
|
||||
"dateTimeOriginal" = "excluded"."dateTimeOriginal",
|
||||
"lockedProperties" = nullif(
|
||||
array(
|
||||
select distinct
|
||||
unnest("asset_exif"."lockedProperties" || $3)
|
||||
),
|
||||
'{}'
|
||||
)
|
||||
|
||||
-- AssetRepository.updateAllExif
|
||||
update "asset_exif"
|
||||
set
|
||||
"model" = $1
|
||||
"model" = $1,
|
||||
"lockedProperties" = nullif(
|
||||
array(
|
||||
select distinct
|
||||
unnest("asset_exif"."lockedProperties" || $2)
|
||||
),
|
||||
'{}'
|
||||
)
|
||||
where
|
||||
"assetId" in ($2)
|
||||
"assetId" in ($3)
|
||||
|
||||
-- AssetRepository.updateDateTimeOriginal
|
||||
update "asset_exif"
|
||||
set
|
||||
"dateTimeOriginal" = "dateTimeOriginal" + $1::interval,
|
||||
"timeZone" = $2
|
||||
"timeZone" = $2,
|
||||
"lockedProperties" = nullif(
|
||||
array(
|
||||
select distinct
|
||||
unnest("asset_exif"."lockedProperties" || $3)
|
||||
),
|
||||
'{}'
|
||||
)
|
||||
where
|
||||
"assetId" in ($3)
|
||||
"assetId" in ($4)
|
||||
returning
|
||||
"assetId",
|
||||
"dateTimeOriginal",
|
||||
|
||||
@@ -7,6 +7,8 @@ from
|
||||
"workflow"
|
||||
where
|
||||
"id" = $1
|
||||
order by
|
||||
"createdAt" desc
|
||||
|
||||
-- WorkflowRepository.getWorkflowsByOwner
|
||||
select
|
||||
@@ -16,7 +18,7 @@ from
|
||||
where
|
||||
"ownerId" = $1
|
||||
order by
|
||||
"name"
|
||||
"createdAt" desc
|
||||
|
||||
-- WorkflowRepository.getWorkflowsByTrigger
|
||||
select
|
||||
|
||||
Reference in New Issue
Block a user