Moved migration related code to specific module
Flake8