update sql

This commit is contained in:
mertalev
2025-12-05 13:03:55 -05:00
committed by Daniel Dietzler
parent 19b427d68a
commit 24daa2f70f

View File

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