Revert "Fixed #22645: Allow apps with no models module to still have migrations"

This reverts commit a4737bf6ae36a5f1cb29f2232f6deeff084fabff.