[Fixed]-Django makemigrations not detecting project/apps/myapp

28👍

You may have deleted the migrations folder inside the app or __init__.py inside the <app>/migrations/ folder, create a new one

myproject/
apps/
    myapp/
        migrations/
            __init__.py

You can always do makemigrations seperately without doing the above step

python manage.py makemigrations myapp

7👍

try

INSTALLED_APPS = [
    # ...
    'myproject.apps.myapp',
]

and

python manage.py makemigrations myapp 

1👍

It’s works now. It didn’t work before because I didn’t make any changes to my model.
I’m new to django and was trying to execute the command from the videos I watched. Django documentation tells you that makemigrations create new migrations based on the changes you made to your model. So, I make changes in models.py and admin.py and it’s working now.

1👍

I had the same problem. I solved it by adding "migrations" file into the app folders.

Leave a comment