I found that the amount of encumbrances for a budget is stored in the database in the encumbered field as in the following which was directly queried from the database table.
Rather than storing the value on disk like this, could you compute it by summing the transactions? I.e. make it a value that it computed from the base tables when the web API call is made?
Storing a computed value like this seems dangerous as the value could get out of sync with what is in the transactions table.
I found that there are other fields in the Finance module that appear to be computed at run time. For example, the readonly fields in financialSummary in fiscal year.
Can you make budget work the same way with respect to fields that a computed from the transactions table?
This would also make data migration easier, as one could simply load into the transactions table and not have to worry about computing value in tables such as budget.
It seems dangerous to me to store computed values like that on disk.