From a490c6dd68470b1be1abac73b00246b07e6bd919 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 31 Dec 2025 14:27:54 +0900 Subject: feat(card): cascade card deletion to note and sibling cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docs/dev/roadmap.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/dev/roadmap.md') diff --git a/docs/dev/roadmap.md b/docs/dev/roadmap.md index e318353..1cd3e99 100644 --- a/docs/dev/roadmap.md +++ b/docs/dev/roadmap.md @@ -120,10 +120,10 @@ Create these as default note types for each user: - **Card**: Deleting a Card also deletes its Note (and all sibling Cards via cascade) **Required Tests for Deletion:** -- [ ] Attempt to delete NoteType with existing Notes → should fail -- [ ] Attempt to delete NoteFieldType with existing NoteFieldValues → should fail -- [ ] Delete Note → verify all related Cards are soft-deleted -- [ ] Delete Card → verify Note and all sibling Cards are soft-deleted +- [x] Attempt to delete NoteType with existing Notes → should fail +- [x] Attempt to delete NoteFieldType with existing NoteFieldValues → should fail +- [x] Delete Note → verify all related Cards are soft-deleted +- [x] Delete Card → verify Note and all sibling Cards are soft-deleted ## Implementation Phases -- cgit v1.2.3-70-g09d2