From own experience, small tip for anybody upgrading #nextcloud and seeing the process stuck in the last step (updating database schema):
It is *really* slow, even for a small / vanilla instance, and does not provide adequate warning to that effect.
Let it run for hours (overnight) before assuming the installation is broken ๐คฆ and embarking on time-consuming reinstalls...