refactor: library type ()

This commit is contained in:
Jason Rasmussen 2024-05-20 18:09:10 -04:00 committed by GitHub
parent 4353153fe6
commit 84d824d6a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 183 additions and 984 deletions
server/src/queries

View file

@ -167,12 +167,10 @@ SET
COALESCE(SUM(exif."fileSizeInByte"), 0)
FROM
"assets" "assets"
LEFT JOIN "libraries" "library" ON "library"."id" = "assets"."libraryId"
AND ("library"."deletedAt" IS NULL)
LEFT JOIN "exif" "exif" ON "exif"."assetId" = "assets"."id"
WHERE
"assets"."ownerId" = users.id
AND "library"."type" = 'UPLOAD'
AND "assets"."libraryId" IS NULL
),
"updatedAt" = CURRENT_TIMESTAMP
WHERE