I get migraines too if I take too much of an opiate. I'm prone to them anyway, but even 10mg extra can bring one on full force. And the ones I get from opiates can not be stopped like my regular ones. I hate uppers, meth, coke, crack, adderral, even though I've had brief affairs with them all. And downers even more so, just took half of a blue xan today and have eaten about 3 times and drank a cup of coffee just to make it go away. Can't stand that feeling either.
Opiates though, are kind of an upper/downer, a nice median, and my battle with those has been long and incredibly costly. (I'm 2.5 weeks clean right now!) As long as I don't take them in excess, keep my tolerance low, and don't redose sooner than I should i can mostly avoid the migraines. Mostly.
Maybe try kratom? Do a ton of research first, it's amazing for pain relief, but is addictive. And as long as you take it correctly you don't need to get a high from it. Just do a ton of research before you try it, from the pro and con sides.