[1.7.x] Fixed #23415 -- Added fields for unmanaged and proxy model migrations.

Thanks sky-chen for the report.

Backport of 215aa4f53b from master