1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

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 <alex.tran1502@gmail.com>
This commit is contained in:
Matthew Momjian 2024-04-11 23:18:51 -04:00 committed by GitHub
parent 1fdbc949d6
commit e65b3a8ea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 <filename>`.
:::
```sql title="Find by checksum (SHA1)"
SELECT encode("checksum", 'hex') FROM "assets";
SELECT * FROM "assets" WHERE "checksum" = decode('69de19c87658c4c15d9cacb9967b8e033bf74dd1', 'hex');
```