Discourse installation fails on database migration

I had a similiar problem. Downgrading ruby from 3.0.0 to 2.7.2 solved it for me.