I once had a severe migraine while I was TTC
and ended up in emerg. They administered
morphine rather than other migraine drugs because it was safest to use in pregnancy.
I also just watched an episode of Life's Birth Stories (like yesterday morning) where the woman who was pregnant suffered physical disabilities with severe pain and was on morphine. The baby was born fully intact, but did suffer withdrawal and had to be weaned. Once weaned, however, they said the baby was fine.