bud can get rid of migrains?

I used to get Migrain headaches when i was smaller (grade school) and I sumtimes get them still but not everyday like before. I literally used to hit my head on the wall to make myself pass out.