Fix #23366: Warn about pending migrations and continue execution

Fix to issue #23366 https://code.djangoproject.com/ticket/23366