Opiates are not medically indicated for migraines.
Triptans are.
So are injections of Ajovy.
This person is not talking about taking opiates. They are talking about medications that suck to take, but reduce the electrical storm of a migraine in the brain.