fixed DataBase schema upgrade bug