fix db upgrade
Merge pull request #365 from LipuFei/fix_db

fix db upgrade