Allow apps with no models module to still have migrations

Basically a4737bf6ae reapplied.