Skip to content
Advertisement

Django error: relation “users_user” does not exist

I’m getting the following error during migration:

django.db.utils.ProgrammingError: relation “users_user” does not exist

JavaScript

This is my model:

JavaScript

Settings:

JavaScript

Anything I have missed?

Advertisement

Answer

Inside your user app, you should have a folder migrations. It should only contain 0001_initial.py and __init__.py. Is that correct?

Try running ./manage.py sqlmigrate user 0001_initial and see what it does, because thats where the error comes from

Advertisement