Rewrite upgrade db versin 6 to 7
fix split type
fix split type
Merge pull request #237 from fefe982/dev-db-up67

Rewrite database upgrade (6 to 7) to remove dependence on old db format