Fixed #22602 -- Improve code coverage of makemigrations command tests