Are migraines hereditary?

No. As far as science knows now it is just a familial association because they often run in families. Someday we might find out they are inherited and find the code on a gene! i would not be surprised.
No. But they do tend to run in families. Maybe someday when we learn more we will actually discover that they are inherited and are coded in our genes somewhere, but so far the answer is no, just a familial association.