sot/timelines — comment on commit a0d477fd23bcddf6b63307800e2d531b2c017534
File: update_load_seg_db.py line 485
By taldcroft:

This logic here is still a bit problematic. I believe that it works now for the current SOSA configuration. However, in general `datestart` is not a unique key here and so previously matching records could (in theory, not in practice) be selected. But I believe that with `wants` and `haves` (aka iFOT and DB) guaranteed to be sorted by the same keys, then at this point you can just say `to_delete = have[i_diff:]`. There should not have to be any reference to `datestart`. Anyway, with your super test suite you can just try this and see if it works. By my logic it should, assuming of course that DB deletes are done by referencing the `id` for each load_seg or timeline downstream.