update sql

pull/24384/head
mertalev 2025-12-05 13:03:55 -05:00 committed by Daniel Dietzler
parent 19b427d68a
commit 24daa2f70f
No known key found for this signature in database
GPG Key ID: A1C0B97CD8E18DFF
1 changed files with 12 additions and 6 deletions

View File

@ -4,9 +4,12 @@
update "asset_exif"
set
"model" = $1,
"lockedProperties" = array(
select distinct
unnest(array_cat("lockedProperties", $2))
"lockedProperties" = nullif(
array(
select distinct
unnest("asset_exif"."lockedProperties" || $2)
),
'{}'
)
where
"assetId" in ($3)
@ -16,9 +19,12 @@ update "asset_exif"
set
"dateTimeOriginal" = "dateTimeOriginal" + $1::interval,
"timeZone" = $2,
"lockedProperties" = array(
select distinct
unnest(array_cat("lockedProperties", $3))
"lockedProperties" = nullif(
array(
select distinct
unnest("asset_exif"."lockedProperties" || $3)
),
'{}'
)
where
"assetId" in ($4)