Fixed #23975 -- Restored pre_migrate signal if all apps have migrations.

Thanks kmmbvnr for the report.