Fixed #23294 -- Add related_name to existing migrations.

https://code.djangoproject.com/ticket/23294

Refs #23288

Thanks to Ramiro Morales for the report and Florian Apolloner for the
review.