[1.7.x] Improve error message for missing migrations in an app
[1.7.x] Fixed #22563: Added migration to admin, fixed a few more loader issues.
[1.7.x] Fixed #22660: Doc'd you can't have unmigrated apps depend on migrated
[1.7.x] Fixed #22833: Autodetector not doing through mapping correctly
[1.7.x] Persist non-schema-relevant Meta changes in migrations
[1.7.x] Fixed #22470: Full migration support for order_with_respect_to
[1.7.x] Fixed #22568: Better proxy model support in migrations
[1.7.x] Fixed several flake8 errors

Backport of d17a4cb037 from master
[1.7.x] Added database migration for contrib.sites.

refs #22170.

Backport of ec6e2eac60 from master
[1.7.x] Added database migration for contrib.flatpages.

refs #22170.

Backport of 7da16b99df from master
[1.7.x] Added database migration for contrib.redirects.

refs #22170.

Backport of d7576bb27a from master
[1.7.x] Fixed #22842

Backport of 7a1f8414c3b71b6af03e5be9f5f8db115551c410 from master.
[1.7.x] Fixed #22844: Duplicate SQL for SQLite FKs
[1.7.x] Fixed #22771 -- Fixed test.Client.logout when using custom auth backend.

Backport of 50b9313e0a from master
[1.7.x] Removed usaged of contrib.sessions as a placeholder in migration tests.

Without this, we're unable to add actual migrations for the app.

Backport of 808388c28c from master
[1.7.x] Added database migration for contrib.sessions.

refs #22170.

Backport of 37a8f5aeed from master
[1.7.x] Fixed #22788 -- Ensured custom migration operations can be written.

This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.

Backport of bb39037fcb from master
[1.7.x] Use __first__ not __latest__ for unknown app dependencies
[1.7.x] Fixed #22848: Ignore no-migrations errors during makemigrations only
[1.7.x] Fixed #22783: Make sure swappable models come first in creation