mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
docs: Update DB queries (#7730)
This commit is contained in:
parent
a50f125dd1
commit
9b27a09131
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,7 @@ Run `docker exec -it immich_postgres psql immich <DB_USERNAME>` to connect to th
|
||||||
## Assets
|
## Assets
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
The `"originalFileName"` column is the name of the uploaded file _without_ the extension.
|
The `"originalFileName"` column is the name of the file at time of upload, including the extension.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```sql title="Find by original filename"
|
```sql title="Find by original filename"
|
||||||
|
@ -40,6 +40,10 @@ SELECT * FROM "assets" where "livePhotoVideoId" IS NOT NULL;
|
||||||
SELECT "assets".* FROM "exif" LEFT JOIN "assets" ON "assets"."id" = "exif"."assetId" WHERE "exif"."assetId" IS NULL;
|
SELECT "assets".* FROM "exif" LEFT JOIN "assets" ON "assets"."id" = "exif"."assetId" WHERE "exif"."assetId" IS NULL;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sql title="size < 100,000 bytes, smallest to largest"
|
||||||
|
SELECT * FROM "assets" JOIN "exif" ON "assets"."id" = "exif"."assetId" WHERE "exif"."fileSizeInByte" < 100000 ORDER BY "exif"."fileSizeInByte" ASC;
|
||||||
|
```
|
||||||
|
|
||||||
```sql title="Without thumbnails"
|
```sql title="Without thumbnails"
|
||||||
SELECT * FROM "assets" WHERE "assets"."resizePath" IS NULL OR "assets"."webpPath" IS NULL;
|
SELECT * FROM "assets" WHERE "assets"."resizePath" IS NULL OR "assets"."webpPath" IS NULL;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue