If it turns out that there's collision attack (see here?) or some peculiar partial preimage attack on SHA-256 then we'd need a new protocol rule (hardfork) that says that starting from block #X in the future the protocol uses SHA-3 everywhere that SHA-256 was used.
If there's a full second preimage attack on SHA-256 then we also need to add an extra field to all the old blocks with their SHA-3 hash, otherwise an attacker could replace an old block with his malicious block, see this.
From what I've heard that's an overstatement: cryptographers focused their efforts mostly on practical collision attacks on SHA-1, and on the SHA-3 competition, so in a relative sense SHA-2 was left neglected.