AFAIK you store the hash along the algorithm/parameters you used to generate it. To update the hash you wait for the user to log in and...
1. check if the stored hash is identical to the hash you generate on fly using the old algorithm
2. create a new hash using the new algorithm and substitute both the old hash and the old informations about the algorithm/parameters
What's the trivial way to achieve it without the user logging in?