feat(postgres): implement notes CRUD and include notes in export/import #15
Closed
opened 2026-07-23 01:51:52 +02:00 by codinget
·
0 comments
Labels
Clear labels
Agentic
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Agent
Fable
Work made by a Claude Fable agent
Agent
gpt-5.6-luna
Work made by a gpt-5.6-luna agent
Agent
gpt-5.6-sol
Work made by a gpt-5.6-sol agent
Agent
gpt-5.6-terra
Work made by a gpt-5.6-terra agent
Work made by an agent
Agent
Opus
Work made by a Claude Opus agent
Agent
Sonnet
Work made by a Claude Sonnet agent
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Reference: codinget/abode#15
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The postgres backend does not implement notes: every note method on
PostgresInterface(listNotes,getNoteById,deleteNoteById,createNote,updateNote,listNotesByAbodeId,listNotesByUserId) throwsError("Unimplemented"), even though thenotestable exists in the pg migrations (3.notes) and the sqlite backend implements the full CRUD.Impact on export/import (PR #13)
Because notes are unimplemented on postgres, the export/import support added in #13 skips the
notekind on the postgres backend:PostgresInterface.export()omits notes from the stream (a pg database holds none anyway).PostgresInterface.import()silently drops anynotelines in an incoming dump (they are not counted in the import summary).So a full sqlite→postgres migration currently carries users/abodes/residents/apikeys but loses notes. This is the only sane behaviour until postgres can represent notes, but it should be closed out.
Scope
PostgresInterface, matching the sqlite semantics (seeSqliteInterface+src/db/postgres/query.tsfor theselectNote(s)/selectPartialNoteshelpers to add).noteinto postgres export/import: add it to the exporttableslist and drop theif (parsed.kind === "note") continue;skip inimport(); add an#importRecordnotecase (mirroring the sqlite one).Related