fix database
fix db upgrade