Sql-Ledger enhanced with our patches