ABSOLUTELY, there is a correlation between migraines and onions -- you are not alone. Until I kept a "food chart," isolating onions as the culprit, I suffered severely for years. It can be cumulative, as well -- that is, one onion, maybe no headache, but an onion the next day -- look out !!!
I have to watch everything I eat very closely. I once was in a cooking class, tending a pot with onions in it, smelling their aroma only, NOT eating any, and had to run home with flashing lights before my eyes, nausea, and a severe headache, lasting, as you said, THREE DAYS.
But NOT since my discovery. Just enter "migraines and onions" in the browser and you will come up with all sorts of correlations re migraines and onions. I did it just now, and came up with a bunch. I use the very top slot on the screen, NOT Google.
I sat at a luncheon a couple of years ago, and the woman opposite me ordered a plate full of onions. I asked her how she avoided migraines. She immediately opened her purse, showing a box full of migraine tablets!
You just have to be very, very careful, especially in restaurants to avoid them. They are in every canned good in the market, as well -- soups, salad dressings, ready made salads, sandwiches, etc.
Hope this helps, and GOOD LUCK !!!