Merge remote-tracking branch 'origin/main' into feat/integrity-checks-izzy

This commit is contained in:
izzy
2026-02-11 16:00:32 +00:00
245 changed files with 5236 additions and 3790 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ select
from
(
select
*
"shared_link".*
from
"shared_link"
where
@@ -243,7 +243,7 @@ select
from
(
select
*
"shared_link".*
from
"shared_link"
where
@@ -316,7 +316,7 @@ select
from
(
select
*
"shared_link".*
from
"shared_link"
where
+69 -41
View File
@@ -78,43 +78,13 @@ limit
-- AssetJobRepository.streamForThumbnailJob
select
"asset"."id",
"asset"."thumbhash",
(
select
coalesce(json_agg(agg), '[]')
from
(
select
"asset_file"."id",
"asset_file"."path",
"asset_file"."type",
"asset_file"."isEdited"
from
"asset_file"
where
"asset_file"."assetId" = "asset"."id"
) as agg
) as "files",
(
select
coalesce(json_agg(agg), '[]')
from
(
select
"asset_edit"."action",
"asset_edit"."parameters"
from
"asset_edit"
where
"asset_edit"."assetId" = "asset"."id"
) as agg
) as "edits"
"asset"."isEdited"
from
"asset"
inner join "asset_job_status" on "asset_job_status"."assetId" = "asset"."id"
where
"asset"."deletedAt" is null
and "asset"."visibility" != $1
and "asset"."visibility" != 'hidden'
and (
not exists (
select
@@ -122,7 +92,7 @@ where
"asset_file"
where
"assetId" = "asset"."id"
and "asset_file"."type" = $2
and "type" = 'thumbnail'
)
or not exists (
select
@@ -130,17 +100,75 @@ where
"asset_file"
where
"assetId" = "asset"."id"
and "asset_file"."type" = $3
and "type" = 'preview'
)
or not exists (
select
from
"asset_file"
where
"assetId" = "asset"."id"
and "asset_file"."type" = $4
or (
"asset"."isEdited" = true
and not exists (
select
from
"asset_file"
where
"assetId" = "asset"."id"
and "type" = 'fullsize'
and "asset_file"."isEdited" = true
)
)
or "asset"."thumbhash" is null
or (
not exists (
select
from
"asset_file"
where
"assetId" = "asset"."id"
and "type" = 'fullsize'
)
and f_unaccent (asset."originalFileName") like any (
array[
'%.3fr',
'%.ari',
'%.arw',
'%.cap',
'%.cin',
'%.cr2',
'%.cr3',
'%.crw',
'%.dcr',
'%.dng',
'%.erf',
'%.fff',
'%.iiq',
'%.k25',
'%.kdc',
'%.mrw',
'%.nef',
'%.nrw',
'%.orf',
'%.ori',
'%.pef',
'%.psd',
'%.raf',
'%.raw',
'%.rw2',
'%.rwl',
'%.sr2',
'%.srf',
'%.srw',
'%.x3f',
'%.heic',
'%.heif',
'%.hif',
'%.insp',
'%.jp2',
'%.jpe',
'%.jxl',
'%.svg',
'%.tif',
'%.tiff'
]::text[]
)
)
)
-- AssetJobRepository.getForMigrationJob
+2 -1
View File
@@ -176,6 +176,7 @@ select
where
"asset_file"."assetId" = "asset"."id"
and "asset_file"."type" = 'preview'
and "asset_file"."isEdited" = $1
) as "previewPath"
from
"person"
@@ -183,7 +184,7 @@ from
inner join "asset" on "asset_face"."assetId" = "asset"."id"
left join "asset_exif" on "asset_exif"."assetId" = "asset"."id"
where
"person"."id" = $1
"person"."id" = $2
and "asset_face"."deletedAt" is null
-- PersonRepository.reassignFace