Fixed #21794 -- Removed deprecation warning for abstract models outside an app.
Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.