In this post I link to and excerpt from emedicine.medscape.com on the treatment of migraine headaches.
What follows is from the Overview
Pharmacologic agents used for the treatment of migraine can be classified as abortive (ie, for alleviating the acute phase) or prophylactic (ie, preventive).
Acute treatment aims to reverse, or at least stop the progression of, a headache. It is most effective when given within 15 minutes of pain onset and when pain is mild. 
Abortive medications include the following:
Selective serotonin receptor (5-hydroxytryptamine–1, or 5-HT1) agonists (triptans)
Serotonin 5-HT1F agonists (ditans) (eg, lasmiditan)
Calcitonin gene-related peptide (CGRP) receptor antagonists (ie, rimegepant, ubrogepant)
Ergot alkaloids (eg, ergotamine, dihydroergotamine [DHE])
Nonsteroidal anti-inflammatory drugs (NSAIDs)
The following may be considered indications for prophylactic migraine therapy:
Frequency of migraine attacks is greater than 2 per month
Duration of individual attacks is longer than 24 hours
The headaches cause major disruptions in the patient’s lifestyle, with significant disability that lasts 3 or more days
Abortive therapy fails or is overused
Symptomatic medications are contraindicated or ineffective
Use of abortive medications more than twice a week
Migraine variants such as hemiplegic migraine or rare headache attacks producing profound disruption or risk of permanent neurologic injury 
Prophylactic medications include the following:
Calcium channel blockers
Selective serotonin reuptake inhibitors (SSRIs)
What follows is from Treatment:
Migraine treatment involves acute (abortive) and preventive (prophylactic) therapy. Patients with frequent attacks usually require both. Measures directed toward reducing migraine triggers are also generally advisable.
Migraineurs should be screened for cardiovascular risk factors, which, if present, should be aggressively treated. Migraineurs with aura should also be counseled on the increased risk of stroke with smoking and oral contraceptive use.
Numerous abortive medications are used for migraine. The choice for an individual patient depends on the severity of the attacks, associated symptoms such as nausea and vomiting, comorbid problems, and the patient’s treatment response. A stratified approach based on the patient’s therapeutic needs has been advanced (see Table 1, below), as has a stepped-care approach.
Moderate Severe Extremely Severe NSAIDs Naratriptan DHE (IV) Isometheptene Rizatriptan Opioids Ergotamine Sumatriptan (SC,NS) Dopamine antagonists Naratriptan Zolmitriptan Lasmiditan Rizatriptan Almotriptan Sumatriptan Frovatriptan Zolmitriptan Eletriptan Almotriptan DHE (NS/IM) Frovatriptan Ergotamine Eletriptan Dopamine antagonists Dopamine antagonists Lasmiditan DHE=Dihydroergotamine; NSAIDs=nonsteroidal anti-inflammatory drugs
Simple analgesics alone or in combination with other compounds have provided relief for mild to moderately severe headaches and sometimes even for severe headaches.  Acute treatment is most effective when given within 15 minutes of pain onset and when pain is mild. 
Analgesics used in migraine include acetaminophen, NSAIDs, and narcotic analgesics (eg, oxycodone, morphine sulfate). Propoxyphene (Darvon) was formerly used; however, propoxyphene products were withdrawn from the United States market in 2010, because this agent can cause prolonged PR interval, widened QRS complex, and prolonged QT interval at therapeutic doses. For more information, see MedWatch safety information, from the US Food and Drug Administration (FDA).
For more severe pain, 5-hydroxytryptamine–1 (5-HT1) agonists (triptans) and/or opioid analgesics are used, either alone or in combination with dopamine antagonists (eg, prochlorperazine [Compazine]). The use of abortive medications must be limited to 2–3 days a week to prevent development of a rebound headache phenomenon.
Intravenous metoclopramide is recognized as an effective therapy for acute migraine, but the optimal dosing has not been established. A study by Friedman et al determined that 20 or 40 mg of metoclopramide is no better in the treatment of acute migraine than 10 mg of the drug. 
Triptans and ergot alkaloids
The 2 categories of migraine-specific oral medications are triptans and ergot alkaloids. The specific ergot alkaloids include ergotamine and dihydroergotamine (DHE).  The specific triptans include the following: 
Although the triptans share a common mechanism of action, they differ in the available routes of administration, onset of action, and duration of action. Routes of administration include oral, intranasal, subcutaneous, and intramuscular.
All the triptans are most effective when taken early during a migraine and all may be repeated in 2 hours as needed, with a maximum of 2 doses daily. While different formulations of a specific triptan may be used in the same 24-hour period, only 1 triptan may be used during this time frame.
The longer-acting triptans (eg, frovatriptan, naratriptan) may be used continuously for several days (mini-prophylaxis) to treat menstrual migraine. Triptans should not be used more than 3 days weekly, to avoid transformed migraine and medication overuse headache.
The effectiveness and tolerability of triptans varies among patients. Lack of response or side effects experienced with one triptan does not predict the response to another. [Emphasis Added]
The safety of triptans is well established, and the risk of de novo coronary vasospasm from triptan use is exceedingly rare. However, triptans should not be taken by patients with known or suspected coronary artery disease, as they may increase risk of myocardial ischemia, infarction, or other cardiac or cerebrovascular events.
The dose of rizatriptan must be reduced to 5 mg in patients taking propranolol. Sumatriptan, zolmitriptan, and rizatriptan are primarily metabolized by monoamine oxidase (MAO) and should be avoided in patients taking MAO-A inhibitors.
The first combination product of a triptan and an NSAID, Treximet, was approved by the FDA in 2008. Treximet contains sumatriptan and naproxen sodium. In 2 randomized, double-blind, multicenter, parallel-group trials, a significantly greater percentage of patients remained pain free for 24 hours postdose after a single dose of Treximet (25% and 23%) than after use of placebo (8% and 7%) or either sumatriptan (16% and 14%) or naproxen sodium (10%) alone. 
Patients with severe headaches need subcutaneous, intravenous, or oral formulations of an ergot alkaloid or triptan. Do not administer vasoconstrictors, such as ergots or triptans, to patients with known complicated migraine*; treat their acute attacks with one of the other available agents, such as NSAIDs or prochlorperazine.*Complicated Migraine.
Mark W. Green, Rachel Colman, in Headache and Migraine Biology and Management, 2015
In October 2019, the FDA approved lasmiditan for treatment of acute migraine with or without aura. Lasmiditan is the first of a new drug class, serotonin 5-HT1F receptor agonists (ie, ditans). Ditans do not elicit a vasoconstrictive effect, whereas triptans cause vasoconstriction via agonistic action at 5-HT1B/1D receptors. Lasmiditan’s approval was based on two phase 3 studies, SAMURAI and SPARTAN, as well as an open label GLADIATOR trial totaling nearly 4000 patients. Collectively, the trials found the percentage of patients that were free of migraine pain at 2 hours postdose ranged from 28.2% to 38.8% compared with placebo of 15.3% to 21.3% (p < 0.001-0.003). [101, 102, 103]
Ubrogepant (Ubrelvy) is the first drug in the class of oral calcitonin gene-related peptide (CGRP) antagonists approved for the acute treatment of migraine. Rimegepant (Nurtec ODT) is another oral CGRP antagonist approved in February 2020 for acute treatment. Previously approved CGRP antagonists are indicated for migraine prophylaxis.
Treatment of nausea and vomiting
Antiemetics (eg, chlorperazine, promethazine) are used to treat the emesis associated with acute migraine attacks. Patients with severe nausea and vomiting at the onset of an attack may respond best to intravenous prochlorperazine. These patients may be dehydrated, and adequate hydration is necessary.
Antiemetics are commonly combined with diphenhydramine to minimize the risk of akathisia. This combination of drugs has been found to be superior to subcutaneous sumatriptan when given intravenously in emergency patients. 
See the above link for:
- Indications for preventive migraine therapy
- The goals of preventive migraine therapy
Currently, the major prophylactic medications for migraine work via one of the following mechanisms:
5-HT2 antagonism – Methysergide
Regulation of voltage-gated ion channels – Calcium channel blockers
Modulation of central neurotransmitters – Beta blockers, tricyclic antidepressants
Enhancing gamma-aminobutyric acid-ergic (GABAergic) inhibition – Valproic acid, gabapentin
Prevention of acetylcholine from presynaptic membrane – Botulinum toxin
Calcitonin gene-related peptide (CGRP) inhibitors – Erenumab, fremanezumab, galcanezumab, eptinezumab
Another notable mechanism is alteration of neuronal oxidative metabolism by riboflavin and reduction of neuronal hyperexcitability by magnesium replacement.
As with abortive medications, the selection of a preventive medication must take into consideration comorbid conditions and the side-effect profile (see Tables 2 and 3, below). Most preventive medications have modest efficacies and have therapeutic gains of less than 50% when compared with placebo. The latency between initiation of therapy and onset of positive treatment response can be quite prolonged. [So give the medicine time to work-I think 6 weeks to two months before giving up and trying something else.] Furthermore, the scientific basis for using most of these medications is wanting.