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:
parent
1fdbc949d6
commit
e65b3a8ea0
1 changed files with 5 additions and 1 deletions
|
@ -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/%';
|
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 encode("checksum", 'hex') FROM "assets";
|
||||||
SELECT * FROM "assets" WHERE "checksum" = decode('69de19c87658c4c15d9cacb9967b8e033bf74dd1', 'hex');
|
SELECT * FROM "assets" WHERE "checksum" = decode('69de19c87658c4c15d9cacb9967b8e033bf74dd1', 'hex');
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue