Skip to content

Commit

Permalink
docs: get asset owner by ID from database (immich-app#14174)
Browse files Browse the repository at this point in the history
asset owner
  • Loading branch information
mmomjian authored and bdavis2-PCTY committed Nov 18, 2024
1 parent edc8f83 commit 0e25f49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/guides/database-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ SELECT * FROM "move_history";
SELECT * FROM "users";
```

```sql title="Get owner info from asset ID"
SELECT "users".* FROM "users" JOIN "assets" ON "users"."id" = "assets"."ownerId" WHERE "assets"."id" = 'fa310b01-2f26-4b7a-9042-d578226e021f';
```

## System Config

```sql title="Custom settings"
Expand Down

0 comments on commit 0e25f49

Please sign in to comment.