Really should see your primary care doctor or a neurologist if you have migraine headaches
Sometimes there are much better controller medications or treatments to help for the migraine. And it might not even be a migraine. It also depends on your allergy to codeine. If you just get itchy, take a non-sedating antihistamine to decrease the itch but the Codeine can help the headache.