How does diabetes affect pregnancy?