Does exercise make migraines worse and tension type headaches better?

Does exercise make migraines worse and tension type headaches better?