django.db.utils.OperationalError: no such table: app_model
Django queried a table that hasn’t been created — migrations missing or not applied.
no such table Meaning
New models need makemigrations + migrate. With SQLite, a different working directory can also point Django at a fresh empty database file.
Common causes
- makemigrations/migrate not run
- Migration files not committed
- Wrong DATABASES path (new empty SQLite file)
- Tests using a database without migrations
⚡ Quick fix
- python manage.py makemigrations && python manage.py migrate
- Commit migration files
- Use an absolute path for the SQLite NAME (BASE_DIR / "db.sqlite3")
Detailed fix by platform
Python
python manage.py showmigrationslists unapplied migrations
How to diagnose
- Table — Which table?
- Migrations — Applied on this DB?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Python
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026