High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(docs): fix the SQL query for finding assets with missing thumbnails (#21770)
Sergey Katsubo0090b9db4a50
diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.mdindex 267e7bf2ad..1a5c2ed193 100644--- a/docs/docs/guides/database-queries.md+++ b/docs/docs/guides/database-queries.md@@ -147,7 +147,10 @@ SELECT "key", "value" FROM "system_metadata" WHERE "key" = 'system-config';### File properties```sql title="Without thumbnails"-SELECT * FROM "asset" WHERE "asset"."previewPath" IS NULL OR "asset"."thumbnailPath" IS NULL;+SELECT * FROM "asset"+WHERE (NOT EXISTS (SELECT 1 FROM "asset_file" WHERE "asset"."id" = "asset_file"."assetId" AND "asset_file"."type" = 'thumbnail')+ OR NOT EXISTS (SELECT 1 FROM "asset_file" WHERE "asset"."id" = "asset_file"."assetId" AND "asset_file"."type" = 'preview'))+AND "asset"."visibility" = 'timeline';``````sql title="Failed file movements"