Skip to content

fix(server): store null instead of empty string for person thumbnailPath - #30070

Open
deveshkolte wants to merge 2 commits into
immich-app:mainfrom
deveshkolte:fix/28832-person-thumbnailpath-null
Open

fix(server): store null instead of empty string for person thumbnailPath#30070
deveshkolte wants to merge 2 commits into
immich-app:mainfrom
deveshkolte:fix/28832-person-thumbnailpath-null

Conversation

@deveshkolte

Copy link
Copy Markdown
Contributor

Description

When a person is created without a thumbnail (before the thumbnail job runs),
the database now stores NULL instead of an empty string "".

Changes:

  • DB column: nullable with default NULL; migration updates existing rows
  • Response schema: allows null to reflect actual stored value
  • TypeScript type: updated Person type to match

Fixes #28832 (person.thumbnailPath column)

How Has This Been Tested?

  • Existing test suite passes
  • Pattern follows the same approach as the already-merged person.name fix

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

None. I manually wrote the code following the established pattern from a previously merged PR for the same issue.

@immich-push-o-matic

immich-push-o-matic Bot commented Jul 20, 2026

Copy link
Copy Markdown

Label error. Requires exactly 1 of: changelog:.*. Found: 🗄️server. A maintainer will add the required label.

@danieldietzler

Copy link
Copy Markdown
Member

You'll have to run mise //:open-api to generate the SDKs and then also update the clients (probably just web). Also, please rebase your PR. (both apply for all of your PRs)

@timonrieger timonrieger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up! A few things before this can go in:

  • critical: thumbnail generation queues people via getAll({ thumbnailPath: '' }). with new persons defaulting to null that never matches, so person thumbnails silently stop being generated. update the query to null
  • strip the session deviceType/deviceOS changes, that's #30048's scope (one column per PR)
  • add db to down() as a param
  • Still missing from the pinned post in #28832: keep returning '' on responses with a v4 TODO, HistoryBuilder on the response fields, regenerated OpenAPI spec/SDKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prefer null values over empty strings

3 participants