Fixed generating database diff