When upgrading to Django 1.8 (with zc.buildout) and running syncdb or migrate, I get this message:
django.db.utils.ProgrammingError: relation \"auth_user\" does no
This problem is contained by running "makemigrations" for all apps, that have not yet been migrated, i.e. apps that do not yet have an "initial_0001.py" file in their migrations directory.
This is done (in our case we use a makefile) by running for each of these apps:
manage.py makemigrations app_name
Once that is done, you can execute:
manage.py migrate
as usual.
The underlying cause for this is that for some reason
manage.py makemigrations
does not always create these initial migrations if they are not already there. And that leads to the mentioned error.
On the contrary,
manage.py makemigrations app_name
does always create them (if not already there). Unfortunately I cannot fathom the reasons for this asymmetry.
Maybe you have found the answer and resolved the problem, but I wanted to point out that, in my case, the above problem was solved by dropping the database and re-creating it again, with the full privileges of the users. I was able to do this because I'm working on a non-production environment, but doing this on a staging environment is not a good idea, so be careful.
Im using python 2.7.12
and following are the specifications of my virtualenv:
Django==1.10.5
django-crispy-forms==1.6.1
django-registration-redux==1.4
djangorestframework==3.5.3
olefile==0.44
packaging==16.8
Pillow==4.0.0
psycopg2==2.6.2