This page contains useful information regarding portfolio migration and consistency check.
SQL request to add events based on installments :
SQL request to check fully repaid loans against total sum of events : in case of discrepency, the request updates the last event so that the sum of repaid capital is exactly equal to the total amount of the loan :
