High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
docs: update queries for descriptions (#9144)
Matthew Momjian3c7b8d560f6c
diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.mdindex a8748f65f9..e20321e052 100644--- a/docs/docs/guides/database-queries.md+++ b/docs/docs/guides/database-queries.md@@ -34,12 +34,22 @@ You can calculate the checksum for a particular file by using the command `sha1s```sql title="Find by checksum (SHA-1)"SELECT encode("checksum", 'hex') FROM "assets";SELECT * FROM "assets" WHERE "checksum" = decode('69de19c87658c4c15d9cacb9967b8e033bf74dd1', 'hex');+SELECT * FROM "assets" WHERE "checksum" = '\x69de19c87658c4c15d9cacb9967b8e033bf74dd1'; -- alternate notation``````sql title="Live photos"SELECT * FROM "assets" WHERE "livePhotoVideoId" IS NOT NULL;```+```sql title="By description"+SELECT "assets".*, "exif"."description" FROM "exif"+ JOIN "assets" ON "assets"."id" = "exif"."assetId"+ WHERE TRIM("exif"."description") <> ''; -- all files with a description+SELECT "assets".*, "exif"."description" FROM "exif"+ JOIN "assets" ON "assets"."id" = "exif"."assetId"+ WHERE "exif"."description" ILIKE '%string to match%'; -- search by string+```+```sql title="Without metadata"SELECT "assets".* FROM "exif"LEFT JOIN "assets" ON "assets"."id" = "exif"."assetId"@@ -94,5 +104,5 @@ SELECT "key", "value" FROM "system_config";## Persons```sql title="Delete person and unset it for the faces it was associated with"-DELETE FROM person WHERE name = 'PersonNameHere';+DELETE FROM "person" WHERE "name" = 'PersonNameHere';```