The minesweepers and most of the other naval ships during WW2 were built conventionally and their protection against magnetic mines was to be 'degaussed'. Cables around the ships had current passed around which countered the ships' natural magnetic signature.
https://en.wikipedia.org/wiki/Degaussing The Algerines and other classes of sweepers had conventional sweeping gear fitted as well, but the degaussing was necessary to stop the sweepers themselves being blown up by the new magnetic mines.
Post-War the decision was made to build a fleet of wooden hulled ships and eventually 119 Ton Class minesweepers were built and came to be used by 9 navies around the world. The RN finally withdrew its last one from service in 1994. Apart from the wooden hull, the use of iron and steel fittings was kept to an absolute minimum by the use of phosphor bronze but there still had to be a lesser degree of degaussing for the two Mirrlees and later Deltic engines plus the third ones which were used for the magnetic loop which produced a strong magnetic signature as it was towed behind to deliberately set off magnetic mines.
https://en.wikipedia.org/wiki/Ton-class_minesweeper
Prince Charles, as he was then, had command of one of them - HMS Bronington.
The din produced by them changing the polarity every 5-10 seconds or so didn't help anyone off watch trying to sleep during extended sweeping exercises.
https://en.wikipedia.org/wiki/Napier_Deltic
Excellent article by Tom Sharpe about press speculation and modern minehunting techniques!