I suspect this is location specific though. In the UK my migraine medication was available over the counter, I still had to have a discussion with the pharmacist every time I bought it. Conversely when ever I've needed an actual prescription medication, in an emergency or whatever, that has always had to go through my doctor to get the prescription sorted.
My go-to pain-relief used to be a product called Codis, which was soluble aspirin+codeine. It used to be available OTC, until about 8 years ago, then it disappeared. You can still buy paracetamol+codeine OTC ("Paracodol?). My understanding is that aspirin causes vasodilation, which causes more rapid absorption of codeine. Supposedly that's why Codis worked better than Paracodol.
I don't know why they took it off the shelves. There was no announcement; it just disappeared.
Codis was effective for both migraines and period pains, as reported to me (I'm not a woman, and I don't suffer from migraines).
This was migraleve it didn't have any painkilling element in the first tablet (it was 2 parts) not much point anyway as by that point I was throwing up.
Well, sure, countries will have their own laws over this or anything. Ours are defined at the federal level and thus apply the same everywhere in the country; since GGP and I are both USian, that's the basis on which I replied. (I don't know enough about any other country's such laws to speak to them!)