[1.7.x] Fixed #22906 -- Added a more helpful repr to migrations' ModelState.

Thanks Collin Anderson for the report and original patch.

Backport of 2572c07cc6 from master