There are also projects to tear out hydro dams, especially smaller ones, because they are ecologically destructive. So while huge dams may generate enough power to justify the ecological cost, a 1MW dam on some relatively minor river may not justify its existence and so it gets torn back out to enable the river to be restored. You can put a bunch of solar panels on malls and office blocks and make up a big chunk of that power without destroying a river, the malls and offices are already our fault because we put them there, so adding solar panels probably doesn't worsen the impact.
A lot of the small dams are also very old and would require a lot of money to keep them running so just tearing them down often turns out to be cheaper long term.