remove out of scope query update

pull/27452/head
Tim Jones 2026-06-01 15:00:57 -07:00
parent b61f435c5e
commit 680367b248
2 changed files with 0 additions and 20 deletions

View File

@ -261,8 +261,6 @@ select
) as "hidden"
from
"person"
left join "user_metadata" on "user_metadata"."userId" = "person"."ownerId"
and "user_metadata"."key" = 'preferences'
where
exists (
select
@ -281,13 +279,6 @@ where
and "asset"."visibility" = 'timeline'
and "asset"."deletedAt" is null
)
group by
"asset_face"."personId"
having
count("asset_face"."assetId") >= COALESCE(
user_metadata.value -> 'people' ->> 'minimumFaces',
'3'
)::int
)
and "person"."ownerId" = $3

View File

@ -369,11 +369,6 @@ export class PersonRepository {
const zero = sql.lit(0);
return this.db
.selectFrom('person')
.leftJoin('user_metadata', (join) =>
join
.onRef('user_metadata.userId', '=', 'person.ownerId')
.on('user_metadata.key', '=', sql.lit(UserMetadataKey.Preferences)),
)
.where((eb) =>
eb.exists((eb) =>
eb
@ -389,12 +384,6 @@ export class PersonRepository {
.where('asset.visibility', '=', sql.lit(AssetVisibility.Timeline))
.where('asset.deletedAt', 'is', null),
),
)
.groupBy('asset_face.personId')
.having(
(innerEb) => innerEb.fn.count('asset_face.assetId'),
'>=',
sql`COALESCE(user_metadata.value -> 'people' ->> 'minimumFaces', '3')::int `,
),
),
)