Categories
Python Answers

How to fix OperationalError No Such Table with Python Django?

Spread the love

Sometimes, we want to fix OperationalError No Such Table with Python Django.

In this article, we’ll look at how to fix OperationalError No Such Table with Python Django.

How to fix OperationalError No Such Table with Python Django?

To fix OperationalError No Such Table with Python Django, we run the migrations to add the missing table.

We run

python manage.py migrate --run-syncdb 

to create the table without migrations with --run-syncdb.

We can also make and run migrations with

python manage.py makemigrations app
python manage.py migrate app

Conclusion

To fix OperationalError No Such Table with Python Django, we run the migrations to add the missing table.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *