# "changes that are not yet reflected in a migration" message despite of "No changes detected" in makemigrations

**URL:** <https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430>\
**Category:** Using the ORM\
**Created:** [March 3, 2022, 11:16am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430 "2022-03-03T11:16:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![IsmaelJerezUCA](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ismaeljerezuca/32/7679_2.png) [@IsmaelJerezUCA](https://forum.djangoproject.com/u/IsmaelJerezUCA)\
**Post date:** [March 3, 2022, 11:16am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/1 "2022-03-03T11:16:21Z")

</div>

Hi,

I recently upgraded from Django 2 to Django 3.2.

Everything works fine but when I execute “migrate” as a manage.py command, it always says “Your models in app(s): ‘admin’, ‘auth’, ‘base’, ‘contenttypes’, ‘sessions’ have changes that are not yet reflected in a migration, and so won’t be applied.  
Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.”

If I execute “makemigrations” commands I always get “No changes detected”.

I downgrade to Django2, the message is gone.

I have every mentioned app on my INSTALLED\_APPS variable in settings. As you can see only ‘base’ app is one of mine, the rest are default Django apps.

I am using Oracle 19 database that can not be recreated.

I hope you can help me or give me some ideas of what is happening and why am I receiving that message from “migrate” command.

Thank you in advance,  
Ismael.

---

<div class="post-metadata">

**Author:** ![django-cook](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/django-cook/32/11223_2.png) [@django-cook](https://forum.djangoproject.com/u/django-cook)\
**Post date:** [December 7, 2022, 1:15pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/2 "2022-12-07T13:15:10Z")

</div>

I have the same type of issue with current Django 4.1.4!

The makemigrations command reports “no changes detected” which is as expected. Running migrate gives me the infamous “Your models in … have changes that are not yet reflected in a migration, and so won’t be applied.” message.

I think it’s strange that two commands that are supposed to work hand in hand disagree on the existence of changes. Don’t they use the same code for this? Also, is there a way to make the migrate command display the reasons for its complaint?

And most importantly: How can this be fixed?

Thanks in advance,

Bo

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 7, 2022, 1:32pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/3 "2022-12-07T13:32:02Z")

</div>

The most common reason I’ve seen for `makemigrations` not recognizing differences between models and tables is that the app doesn’t have a `migrations` directory.

See the docs for [makemigrations](https://docs.djangoproject.com/en/4.1/ref/django-admin/#makemigrations)

Side note: The two commands `makemigrations` and `migrate` really do perform two completely different operations. Yes, `migrate` uses the output of `makemigrations` as input - but there are other ways of creating migration files as well. (e.g. See [Migrations | Django documentation | Django](https://docs.djangoproject.com/en/4.1/topics/migrations/#data-migrations))

---

<div class="post-metadata">

**Author:** ![django-cook](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/django-cook/32/11223_2.png) [@django-cook](https://forum.djangoproject.com/u/django-cook)\
**Post date:** [December 8, 2022, 1:18pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/4 "2022-12-08T13:18:36Z")

</div>

Hi Ken…

…and thank you for your feedback. All my migration directories are alive and well. So this can’t be the cause.

Some more info: I have around 10 apps in my django folder and the problem only affects one of them. I haven’t done any changes to that apps models lately which is why I wonder why this problem occurs now. I just updated to Django 4.1.4, maybe that’s a clue?

BTW, if I deliberately change the model, makemigrations does its job and so does migrate _without_ any complaints. When I run “manage.py migrate” again, I immediately receive the error mentioned above. I think, this is a rather strange behavior, so could this maybe be a bug in the migrate script? I was hoping that migrate and makemigrations use the same code to discover changes but that does not seem to be the case…

Bye,

Bo

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 8, 2022, 3:11pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/5 "2022-12-08T15:11:09Z")

</div>

> [@django-cook](#):
>
> BTW, if I deliberately change the model, makemigrations does its job and so does migrate _without_ any complaints. When I run “manage.py migrate” again, I immediately receive the error mentioned above.

I would suggest using the [sqlmigrate](https://docs.djangoproject.com/en/4.1/ref/django-admin/#sqlmigrate) command on that last working migration to see the SQL being generated for that migration - and then checking the database to verify that those operations were actually performed.

While it’s _possible_ that there’s a bug in migrate, I’m more inclined to believe the problem is going to either be a permissions issue with the database to where the user account being used doesn’t have permissions to perform the necessary operation, or an issue with the Oracle backend, or some type of version incompatibility in one of the libraries along the line.

Aside from upgrading Django, you’ll want to ensure that other required libraries are up-to-date as well.

See the [Oracle notes](https://docs.djangoproject.com/en/4.1/ref/databases/#oracle-notes) for some further details.

---

<div class="post-metadata">

**Author:** ![django-cook](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/django-cook/32/11223_2.png) [@django-cook](https://forum.djangoproject.com/u/django-cook)\
**Post date:** [December 8, 2022, 4:50pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/6 "2022-12-08T16:50:48Z")

</div>

Thanks again, this is a good idea indeed. 🙂 Just checked the last 3 migrations against the database. They seem to have performed correctly and added the requested fields. As said before, I didn’t modify the models anyway apart from the deliberate changes I made to test the migration scripts…

I just made some copies of the migrate and makemigrations commands and added some debug output. Migrate is indeed getting a new migration (last number + 1) from autodetector.changes() while makemigrations isn’t.

---

<div class="post-metadata">

**Author:** ![paris-ci](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/paris-ci/32/16200_2.png) [@paris-ci](https://forum.djangoproject.com/u/paris-ci)\
**Post date:** [September 29, 2023, 10:20am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/7 "2023-09-29T10:20:01Z")

</div>

I had the same issue but found the solution, and since googling for it led me here first, here’s what worked for me.

I place all my models in a `models` folder with an ` __init__.py` file inside, and then I separate models with one file for each model. I simply forgot to import the new models in the ` __init__.py` file.

So let’s say you have `models/A.py` containing the model A, you need to add `from .A import A` in your `models/ __init__.py` file

---

<div class="post-metadata">

**Author:** ![johnpsar](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/johnpsar/32/21899_2.png) [@johnpsar](https://forum.djangoproject.com/u/johnpsar)\
**Post date:** [June 11, 2024, 8:18am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/8 "2024-06-11T08:18:05Z")

</div>

This happened to me recently. The problem for me was that I had as a default value for a uuid field ‘uuid.uuid4()’ and that caused to be evaluated every time I was running the migrate command and having a different value each time which caused to appear as having not migrated changes

---

<div class="post-metadata">

**Author:** ![parshva10](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/parshva10/32/24429_2.png) [@parshva10](https://forum.djangoproject.com/u/parshva10)\
**Post date:** [October 8, 2024, 6:47am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/9 "2024-10-08T06:47:10Z")

</div>

what have you then to fix that issue? I think I have the same issue having the field uuid.uuid4()

---

<div class="post-metadata">

**Author:** ![matthiask](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/matthiask/32/115_2.png) [@matthiask](https://forum.djangoproject.com/u/matthiask)\
**Post date:** [October 8, 2024, 7:05am UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/10 "2024-10-08T07:05:46Z")

</div>

Sounds like `default=uuid.uuid4()` instead of the correct `default=uuid.uuid4`. The `default` value should be a callable in this case, not a UUID value.

---

<div class="post-metadata">

**Author:** ![Ivy-Chelsea](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ivy-chelsea/32/26525_2.png) [@Ivy-Chelsea](https://forum.djangoproject.com/u/Ivy-Chelsea)\
**Post date:** [January 27, 2025, 12:20pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/11 "2025-01-27T12:20:12Z")

</div>

In case you are in the testing stage and deleting the database won’t affect anything much, you can try this: I cleared the db.sqlite,I also cleared everything in migrations directory except **init**.py, then rerun py manage.py makemigrations and py manage.py migrate

---

<div class="post-metadata">

**Author:** ![meshashiranjan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/meshashiranjan/32/28760_2.png) [@meshashiranjan](https://forum.djangoproject.com/u/meshashiranjan)\
**Post date:** [June 2, 2025, 2:14pm UTC](https://forum.djangoproject.com/t/changes-that-are-not-yet-reflected-in-a-migration-message-despite-of-no-changes-detected-in-makemigrations/12430/12 "2025-06-02T14:14:47Z")

</div>

SOLVED!!!

Use the command:

`python manage.py migrate --fake --prune <app_label>`

Where app\_label is the app for which migrate command complained.
