mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 18:08:48 -07: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:
parent
1fdbc949d6
commit
e65b3a8ea0
@ -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');
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user