20981ec1ce84b7f885ce6dc5ff375984e537ebef
Colony.currentQueenId is unique across colonies. dissolve() and merge() set status to DISSOLVED/MERGED but never cleared currentQueenId, so a colony that still had a queen when it was dissolved or merged kept permanently "owning" her - any later attempt to assign that queen to a different colony (e.g. requeening another colony with her) would fail with a unique-constraint conflict, since the dead colony's stale reference was still occupying that slot. Both operations now clear currentQueenId and close the open QueenColonyHistory row for that queen, mirroring the bookkeeping assignColony() and the queen-status-transition fix already do elsewhere. The merge survivor keeps its own queen; a merged-away colony's queen is released, not auto-transferred, since which queen "wins" a merge is a beekeeper decision. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Description
ApiCore - Imkereidokumentationssoftware
https://apicore.encry.de/
9 MiB
0 Stars
1 Watchers
0 Forks
Languages
TypeScript
98.1%
JavaScript
1.1%
Python
0.3%
CSS
0.3%
PLpgSQL
0.1%