I’d like to drop in here and say this might break your database even more than the broken users will!
We now are stuck halfway between upgrades as a lot of constraints are still relying on users_old since we renamed the table, and this was only shown as an issue a few days after applying this apparently incomplete fix, also like users including indexes is not enough (it’ll ignore the id sequence for example).