Rewrite upgrade db versin 6 to 7

Rewrite DB upgrade without the need to export and import, which also eliminates the need for DbAdapters.

This will remove the need to maintain legacy support for old db format.

However, the CREDIT/DEBIT (split.type) confused me. I'm not sure whether they are correct.

I test upgrading from 1.3.3, wiht CASH/INCOME/EXPENSE account, create one transaction in INCOME which increases CASH, one transaction in EXPENSE which decreases CASH. After the upgrade, the money change in CASH seem to be correct.
However, upgrading from 1.3.3 to 1.4.3 gave me a wired result, with both transactions decreases CASH.
I think you mush check that part to see whether it is correct.

Other than that, the code should work. I tried to import my whole account tree with no problem.
Yes, this is the opposite. But this seems to get my expected results in the tests I used. So this get me quite confused.
As you mentioned in the last comment, the way of managing and displaying double entry account is quite different. It is correct that if one transaction increases the main account in 1.3.x, it will also increase the account (when displayed) in 1.4.x ? And the increase/decrease in the other account may be inverted (when displayed) in the migration?