feat: room↔document junction table (schema v15)#692
Merged
Conversation
| "CREATE TABLE IF NOT EXISTS room_documents ( | ||
| room_id TEXT NOT NULL REFERENCES rooms(id) ON DELETE CASCADE, | ||
| doc_slug TEXT NOT NULL, | ||
| added_at TEXT NOT NULL, |
| CREATE TABLE IF NOT EXISTS room_documents ( | ||
| room_id TEXT NOT NULL REFERENCES rooms(id) ON DELETE CASCADE, | ||
| doc_slug TEXT NOT NULL, | ||
| added_at TEXT NOT NULL, |
🔍 Cora AI Code Review🟡 Warning (1)
Review powered by cora-cli · BYOK · MIT |
New room_documents table with room_id + doc_slug composite PK. Enables explicit room-to-document linking beyond memory wikilinks. Store methods: - room_add_document(room_id, doc_slug) - room_remove_document(room_id, doc_slug) - room_list_documents(room_id) → Vec<slug> - document_list_rooms(doc_slug) → Vec<room_id> Server endpoints: - PUT /room/document/add - DELETE /room/document/remove - POST /room/document/list - POST /doc/room/list Refs #689
- Add room_add_document, room_remove_document, room_list_documents, document_list_rooms to Uteke public API (rooms.rs) - Replace uteke.store.xxx with uteke.xxx in server handlers - Add missing ns binding in /tags GET handler - Apply cargo fmt
22ab895 to
0e6709a
Compare
The handlers used json!() which is not in scope — must be serde_json::json!() to match the rest of handlers.rs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
room_documentsjunction table (schema v15 migration) enabling explicit room-to-document linking beyond the automatic memory[[doc-slug]]wikilinks from PR #691.Schema change
Store methods
room_add_document(room_id, doc_slug)room_remove_document(room_id, doc_slug)room_list_documents(room_id)document_list_rooms(doc_slug)Server endpoints
/room/document/add{room_id, doc_slug}/room/document/remove{room_id, doc_slug}/room/document/list{room_id}→{doc_slugs}/doc/room/list{doc_slug}→{room_ids}Test results
dream::testsfailures (ONNX unavailable)Refs #689