Problem
When deleting (or inserting) a measure_grid column, any measures that have references to measures will be re-referenced to the new measures at those coordinates. This will lead to crashes in some cases when a measure references itself.
Solution
We gotta move to using IDs instead of coordinates. that is, reference measures should reference measures by their IDs and not by their locations on the measure grid.
It's also possible to "shift" the referenced coordinates of the measures on insert/delete. However, now this means that a delete/insert/append operations need to be responsible for measure references, which doesn't seem like a good idea.
Problem
When deleting (or inserting) a measure_grid column, any measures that have references to measures will be re-referenced to the new measures at those coordinates. This will lead to crashes in some cases when a measure references itself.
Solution
We gotta move to using IDs instead of coordinates. that is, reference measures should reference measures by their IDs and not by their locations on the measure grid.
It's also possible to "shift" the referenced coordinates of the measures on insert/delete. However, now this means that a delete/insert/append operations need to be responsible for measure references, which doesn't seem like a good idea.