Commit graph

4 commits

Author SHA1 Message Date
638362df1c feat: improve move-draft-to-current with differential sync
Implement differential sync for organization structure and positions
instead of delete-all-and-insert-all approach.

Changes:
- Add OrgIdMapping and AllOrgMappings interfaces for tracking ID mappings
- Implement syncOrgLevel() helper for differential sync per org level
- Add syncPositionsForPosMaster() helper for position table sync
- Process org levels bottom-up (Child4→Child3→Child2→Child1→Root)
- Use ancestorDNA matching with Like operator for descendant sync
- Cascade delete positions before deleting org nodes
- Batch DELETE/UPDATE/INSERT operations for better performance
- Track draft→current ID mappings for position updates
- Add comprehensive documentation in docs/move-draft-to-current.md

Benefits:
- Preserve IDs for unchanged nodes (better tracking)
- More efficient (fewer database operations)
- Better data integrity with proper FK handling
- Sync all descendants under given rootDnaId

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:35:59 +07:00
656c2e7341 Changed LogMemoryStore from active refresh (setInterval) to passive refresh on-access (60 min TTL) 2026-01-29 00:30:34 +07:00
7955c855bc fix: extend OrgStructureCache TTL and add graceful shutdown cleanup
- Extended OrgStructureCache TTL from 10 to 30 minutes (reduce cleanup frequency)
- Added orgStructureCache.destroy() in graceful shutdown handler
- Updated documentation to reflect changes

Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
2026-01-29 00:05:56 +07:00
e4cfac2eb2 add: docs and backup file 2026-01-28 23:10:50 +07:00