From e65b3a8ea0a52df76a5c5d90cc6e3ec64f7a0e12 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:18:51 -0400 Subject: [PATCH] docs: document type of checksum stored in DB (#8737) * Update database-queries.md * Update database-queries.md * Update database-queries.md --------- Co-authored-by: Alex --- docs/docs/guides/database-queries.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.md index e8252f25d6..cccfd5b31a 100644 --- a/docs/docs/guides/database-queries.md +++ b/docs/docs/guides/database-queries.md @@ -27,7 +27,11 @@ SELECT * FROM "assets" WHERE "originalPath" = 'upload/library/admin/2023/2023-09 SELECT * FROM "assets" WHERE "originalPath" LIKE 'upload/library/admin/2023/%'; ``` -```sql title="Find by checksum" (sha1) +:::note +You can calculate the checksum for a particular file by using the command `sha1sum `. +::: + +```sql title="Find by checksum (SHA1)" SELECT encode("checksum", 'hex') FROM "assets"; SELECT * FROM "assets" WHERE "checksum" = decode('69de19c87658c4c15d9cacb9967b8e033bf74dd1', 'hex'); ```