Database error on upgrade to 22.1.0

This post fixed it for me:

I set mariadb to image version 10.5 and the upgrade went through. I set NextCloud to :stable which is currently 21.0.4. I’ll just stick with the stable versions from now on.