[1.7.x] Fixed #22851: BinaryView wasn't getting a binary default
[1.7.x] Fix test breakage on MySQL
[1.7.x] Fixed #22819 -- Renamed output_type -> output_field in query expression API.

Thanks jorgecarleitao for the suggestion.

Backport of 95cc0e15b4 from master
[1.7.x] Fixed #22577: Python 3 broke on non-module migrations directory
[1.7.x] Fix previous commit on python 2
[1.7.x] Fixed #22853: Swapped models are now ignored for migration operations.