According to this thread, I believe that during an upgrade Mines should be inactive. I'm currently in the process of upgrading my Mines and one just popped during an attack on me. They were all armed before the attack. It can't be rearmed, directly or indirectly (expected behaviour, as per @Lynsey [Midoki] 's response in the Flame Gate thread).
I hope this is not the case and it is working as intended. workding as intended meaning, it will still work while ugrading, but once popped, you must wait. At least that's what's been happening with mine. Not even getting one pop during upgrade will be devastating, at least for me, for that long time period.
Yes, unfortunately I had the same frustration. I left the mines to last, but in the 2-3 days it took to upgrade all 5 mines my base was left with decreased defences. I started moving my unexploded mines to cover the high risk area, but in the end you just have to wait it out.
As much as I'd love my Mines to keep working (still have 3 left to go), it doesn't make sense that they should function during an upgrade. Much like Gold Mines, Grog Distilleries, Flame Gates and pretty much every other building ceases to function during an upgrade.
@Lynsey [Midoki] to add another little quirk, the greyed out "Re-arm all" button displays 0 *grog* instead of gold (as in it's greyed out because the only Mines available to be re-armed are presently being upgraded). Edit: It appears this isn't always repeatable. I'll try figure out how to trigger it.