Fixed #23415 -- Add fields for unmanaged and proxy model migrations

Ticket: https://code.djangoproject.com/ticket/23415
Most of the comments above apply to this block as well.