refactor: activity queries (#15207)

This commit is contained in:
Daniel Dietzler 2025-01-10 00:14:36 +01:00 committed by GitHub
parent 1fb2b3f899
commit 7d50d3032b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -31,11 +31,11 @@ select
count(*) as "count"
from
"activity"
left join "users" on "users"."id" = "activity"."userId"
inner join "users" on "users"."id" = "activity"."userId"
and "users"."deletedAt" is null
left join "assets" on "assets"."id" = "activity"."assetId"
where
"activity"."assetId" = $1
and "activity"."albumId" = $2
and "activity"."isLiked" = $3
and "users"."deletedAt" is null
and "assets"."deletedAt" is null