Skip to content

Fix #885: Handle null names for un-geocoded significant places in memories#886

Merged
dgraf-gh merged 1 commit intodedicatedcode:mainfrom
subha0319:main
Apr 7, 2026
Merged

Fix #885: Handle null names for un-geocoded significant places in memories#886
dgraf-gh merged 1 commit intodedicatedcode:mainfrom
subha0319:main

Conversation

@subha0319
Copy link
Copy Markdown
Contributor

Problem

Memory creation throws a SQL NOT NULL constraint violation on memory_visits.name when a significant place has no geocoded name.

Fix

  • Added migration V88__allow_null_name_in_memory_visits.sql: drops the NOT NULL constraint from memory_visits.name
  • Updated MemoryVisit.java: create() now falls back to the place's city, or coordinates ("46.9728, 10.9687") if city is also absent
  • Updated MemoryVisitJdbcService.java: added a null guard before the INSERT as a second line of defence

Fixes #885

Copy link
Copy Markdown
Contributor

@dgraf-gh dgraf-gh left a comment

Choose a reason for hiding this comment

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

I added a remark, the rest looks good to me.

I am not sure if we let the code try to figure out what to display is the right move. The alternative would be to store null and display "unknown place".

At the moment, there is no way of renaming them later. I think we should keep the fallback for now and add a new feature where ot will be possible to rename a visit in the memory. Then we can drop the fallback again.

…edicatedcode#885 - Memory creation failed with NOT NULL constraint violation when significant places had not been geocoded and name was null.
Copy link
Copy Markdown
Contributor

@dgraf-gh dgraf-gh left a comment

Choose a reason for hiding this comment

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

Thank you for the effort. Looks good to me and will solve the immediate problem

@dgraf-gh dgraf-gh merged commit 658d0c6 into dedicatedcode:main Apr 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memories not working with not geocoded significant places.

2 participants