Intermittent fasting with migraine

Hallo! Having a chronic migraine I wonder, how I could integrate intermittent fasting in my diet – without risking an attack. Up to now, the doctors have always advised me to eat regularly and not to skip any meal. And my personal experience of having to skip a meal (unwanted and unplanned) was bad: I always got headaches after three hours at the latest. What can I do? Thank you for your answer in advance.