Skip to content

Q&A · Answered

Django migrations not applying - troubleshooting guide

asked 9 months, 1 week ago 2119 views 1 answer
40

I made changes to my models but migrations are not being applied. makemigrations shows "No changes detected". What's wrong?

1 Answer

One accepted
17

Accepted answer

Not confirmed since it was written, 9 months, 1 week ago

This is a common Django issue. Here's how to troubleshoot:

Check app is in INSTALLED_APPS

# settings.py
INSTALLED_APPS = [
    ...
    'your_app',  # Make sure your app is listed
]

Specify app name explicitly

# Run with app name
python manage.py makemigrations your_app

Check for migration conflicts

# Show migration status
python manage.py showmigrations
# Fake apply if needed
python manage.py migrate --fake your_app

Your answer

Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.

Shown beside your answer and never checked, so it cannot be a name someone already has here.

No account needed to answer. Sign in instead and it carries your name and earns reputation.