I had debilitating and I mean debilitating( 8 hours on the floor in the dark next to the toilet) migraines during pregnancy. My doctor allowed me to use meprozine. Which is a combination of phenergan and demerol throughout my pregnancy. The phenergan keep you from vomiting the pill back up and helps you to rest comfortably. Our baby was an IVF baby and my pregnancy was high risk and well monitored by some of the top experts in maternal fetal medicine in the country. They all were in agreement that this was a safe medication to use ( appropriately) during this type of headache as being in the throws of this kind of pain was no good for either Mom or baby.
It was prescribed by my high risk OB GYN. You may want to ask about this medicine. It is most often used by dentists but really works for pain management of severe migraines. I still use it sparingly for 10 out of 10's and it helps.
Hope this helps.