small fix, on upgrade method was wrong and added synchronized to databse
methods