Jahongir Rahmonov

I'm a Software Developer at Super Dispatch (TechStars '16). Avid reader. WIUT graduate. Blogger and an amateur speaker

I write about Python, Django, AngularJS and sometimes something non-technical.

Welcome to my corner

Thu 01 October 2015

"Relation 'auth_user' does not exist" bug in Django 1.8

I recently started a fresh project in Django 1.8 with PostgreSQL. I set everything up and was ready to do my migrations. To my surprise, I got this error: ProgrammingError: relation "auth_user" does not exist.

I had absolutely no fancy stuff that could cause some problem.

I looked around and found out that I was not the only one. Even some issues were opened on this question.

In short, here is how I solved it:

First option is to migrate the model which others depend on, i.e. auth_user and then the rest:

python manage.py migrate auth
python manage.py migrate

Second option is downgrade the Django to 1.7 version and everything should work fine.

I hope this tip will prevent at least somebody from wasting a lot of time like I did.

Fight on!


If you liked what you read, subscribe below. Once in a while, I will send you a list of my new posts.