# Django 4.0.3: "Error no such table" when i add or modify models in existing apps

**URL:** <https://forum.djangoproject.com/t/django-4-0-3-error-no-such-table-when-i-add-or-modify-models-in-existing-apps/14673>\
**Category:** Mystery Errors\
**Created:** [July 7, 2022, 12:09pm UTC](https://forum.djangoproject.com/t/django-4-0-3-error-no-such-table-when-i-add-or-modify-models-in-existing-apps/14673 "2022-07-07T12:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptrs32](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@ptrs32](https://forum.djangoproject.com/u/ptrs32)\
**Post date:** [July 7, 2022, 12:09pm UTC](https://forum.djangoproject.com/t/django-4-0-3-error-no-such-table-when-i-add-or-modify-models-in-existing-apps/14673/1 "2022-07-07T12:09:01Z")

</div>

Hello everyone,

I have a problem with a function that seems simple to me from Django, which is adding or modifying a Model in an application.

To add a model in an already existing application with tables already migrated, I follow the following steps:  
1 - I create the new class, after the others, in my _models.py_ file  
2 - I add the line `admin.site.register(myNewModel)` in _admin.py_  
3 - I run a `python manage.py makemigrations myApp` and I can see my table in the text that appears.  
4 - Then a `python manage.py migrate myApp`

Then I open my admin space of the project and I see that the new table is present, except that when I click on it I have an error page

> OperationalError at/admin/myApp/myNewModel/  
> no such table: myApp\_myNewModel

and also it is impossible to add anything in, it’s actually not created…

I have been searching for a long time and what works is to completely delete my database before launching a makemigrations/migrate but I would like to find a less radical solution.

I have Django 4.0.3 and the base is the default is in sqlite3.

Thank you in advance for your answers, do not hesitate if you need more information.

---

<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:** [July 7, 2022, 2:27pm UTC](https://forum.djangoproject.com/t/django-4-0-3-error-no-such-table-when-i-add-or-modify-models-in-existing-apps/14673/2 "2022-07-07T14:27:39Z")

</div>

What output do you get from `python manage.py migrate myApp`?

What does `python manage.py showmigrations` show?

What does your new model look like?
