Can't upgrade from 16.11.3 to 17.0.x - Database Migration Error

I found this topic Upgrade Gitlab version 16.11.3 → 17.0.1 which seems to cover the same issue but discusses it within the docker context - I think this issue may not be restricted to just containerization scenarios.