If there's one thing I've learned in the last year is that my HEALTH is far more important than my job, school, or really anything else. If I can't be healthly, I don't enjoy any of them. Furthermore, I might lose my job in 5 years, I might be out of school in 1 year, but my health will always be with me.
That said, your health should take precedence here. This obviously isn't something you can handle directly, and although your coworkers will resent you, this is something for management to do. They'll be pissed as hell that you "tattled" on them, but a manager's JOB is to make sure that his or her underlings are being as productive and happy as they can reasonably be. If your manager can't suck it up and do his fucking job, then he needs a new fucking job. I don't know if you have it in Denmark, but in the US we have a group called OSHA - Occupational Safety and Health Administration - which works to ensure that workplaces are healthy and safe. They'd love to hear about a manager letting workers suffer migraines daily becuase of an unsafe workplace. Look to see if there's anything there that is similar. And use it to pressure your boss. Bring it up to him again, and tell him the things you told us -- that you can't even concentrate with the migraines, that you need your training.. etc.
And I'd do a little research into your program - ask them if health would be a valid reason for not completing your training. If all else fails, you'll at least have a back-out plan for these inconsiderate bastards.
I'd never even heard of a place that allowed smoking indoors -- that's shocking. If it were me, I'd start lacing their cigarettes with some illicit drug and then encourage random drug testing.
