aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/server/repositories/note.test.ts
AgeCommit message (Collapse)Author
2025-12-31feat(card): cascade card deletion to note and sibling cardsnsfisis
When a card is deleted, now also soft-deletes its parent Note and all sibling cards (other cards generated from the same note). This matches the specified behavior in the roadmap where deleting any card from a note-based group should remove the entire note and all its cards. Also adds tests for deletion constraint behaviors: - NoteType deletion blocked when Notes exist - NoteFieldType deletion blocked when NoteFieldValues exist - Note deletion cascades to all related Cards - Card deletion cascades to Note and sibling Cards 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(schema): make note_id and is_reversed NOT NULLnsfisis
All cards now require note association - legacy card support removed. This aligns with the note-based card architecture introduced in Phase 8. - Add database migration for NOT NULL constraints - Update client Dexie schema to version 3 - Remove LegacyCardItem component and legacy card handling - Update sync schemas and type definitions - Update all tests to use note-based cards 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(repo): extend CardRepository with note data supportnsfisis
Add noteId and isReversed fields to Card interface for note-based cards. Implement findByIdWithNoteData, findByNoteId, and softDeleteByNoteId methods to support fetching cards with their associated note data and cascading deletions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(repo): add Note repository with CRUD operationsnsfisis
Implements NoteRepository for Note feature (Phase 2 of roadmap): - Create notes with field values and auto-generate cards - Support reversible note types (creates 2 cards) - Update notes and their field values - Soft delete notes with cascade to cards - Template rendering for card front/back content 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>