Django: python manage.py migrate does nothing at all Django: python manage.py migrate does nothing at all django django

Django: python manage.py migrate does nothing at all


Well, you say that you first start the server and then type in the commands. That's also what the terminal feed you shared shows.

Do not run the server if you want to run management commands using manage.py.

Hit Ctrl+C to exit the server and then run your migration commands, it will work.


Try:

python manage.py makemigrationspython manage.py migrate


@adam-karolczak n all

If there are multiple DJANGO Projects, it can happen that DJANGO_SETTINGS_MODULE is set to some other app in environment varibles, the current project manage.py will not point to current project settings thus the error.

So, confirm DJANGO_SETTINGS_MODULE in fact points to the settings.py of current project.

Close the project if its running viz. ctrl+C. You can also check the server is not running ( linux ) by

ps -ef | grep runserver

Then kill the process ids if they exist.If you confirmed settings.py in DJANGO_MODULE_SETTINGS is for the project you are having issue.Run the following it should resolve.

python manage.py makemigrationspython manage.py migrate

Hope it helps.