mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
Add entity-level deletion guards to QueryFolder and ConnectionFolder: if a folder still has queries/connections, .remove() throws a descriptive error before touching the database. This mirrors the cloud API behaviour where non-empty folders cannot be deleted. Unit tests (18 total, 9 per model) cover: - Basic save/retrieve - Deletion blocked when folder contains items (checks error message, count wording, singular vs plural) - Deletion succeeds when folder is empty - Deletion succeeds after items are moved out (items survive) - Parent folder relationship is persisted correctly - Deleting a parent folder (no direct items) succeeds and sets child folder parentId to NULL via DB-level SET NULL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>