mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
A start logged within one period before an existing start folds that start into itself and soft-deletes it, since the two are one period entered out of order. Nothing recorded which start was folded, so taking the earlier start back could not bring the later one back: a mis-tap on the 5th with a real start on the 10th, then deleted, left the 10th gone and the cycle before it reopened. Migration 0345 adds menstrual_cycles.absorbed_into_id. The folded row names the start that absorbed it; removing that start restores it, re-derives its own end and hands its days back to it. The column is needed because a soft-deleted row alone cannot tell a folded start from one the person deleted, and the audit trail is not state a removal can read. Deleting a cycle directly now runs the same shared removal as deleting its day-log.