Lessen the dose. Since headaches are a common symptom of caffeine withdrawal, and you already suffer from migraines, very gradually lessen the amount of caffeine you drink. Some migraine suffers find that even a small amount of caffeine can be enough to relieve their headaches. Gradually wean yourself off of coffee, tea, and other caffeine-containing drinks by sipping smaller amounts throughout the day. Drinking smaller amounts more frequently may lessen the sudden addictive jolt of high levels of caffeine in your bloodstream. Also, consume your beverage slowly -- sip a soda over an hour or so, rather than downing it all at once.
Decaffeinate or lessen the caffeine in what you brew. Here's a trick I use to decaffeinate tea: Dip the bag in very hot water for 20 seconds. Discard that liquid and put the tea bag into a fresh cup. Since caffeine is very soluble in water, just 20 to 30 seconds will remove much of the caffeine while preserving most of the flavor. Or, try switching to sipping on herbal teas and decaffeinated coffee or tea. Usually these still contain a tiny bit of caffeine; possibly just enough to keep you from suffering headaches. Also, shorten brewing times. The longer tea and coffee are brewed, the more caffeine is likely to be released.
Try healthier substitutes. If you're also in the habit of drinking tea and coffee as well as soda, you're probably conditioned to the soothing effects of the warm water and/or the flavor. Try herbal teas or even just hot water with a few drops of lemon juice. As far as your soda habit is concerned, your best bet is to completely eliminate all caffeine-containing sweetened beverages from your diet while pregnant. The combination of the caffeine buzz and the sugar rush is an absolute no-no for the body at all times, and especially when you're pregnant. In addition, almost all sodas contain phosphoric acid which can leach calcium from your bones -- and that's a vital bone-building nutrient both you and your baby need this during this time.
The next time you see your healthcare provider, ask about alternative ways to treat and prevent migraines so that you can enjoy a healthy pregnancy and healthy baby.