after a long time procrastinating I decided to upgrade my django app from 1.7.11 to 1.8.13 (due to its LTS). Everything went fine and after fixing some clear errors (I needed to upgrade to django-mptt==0.8.4
and django-filter==0.13.0
alongside with Django==1.8.13
) and deleting some conflicting field attributes, I maganed to run my server properly.
Apparently my app works fine (I test the website manually, performing 2-3 actions and I see no clear error).
However, when running the tests (with ./manage.py test -v 3
), I get the following output:
[...]
Running pre-migrate handlers for application debug_toolbar
Creating tables...
Creating table corsheaders_corsmodel
Creating table actstream_follow
Creating table actstream_action
Creating table thumbnail_kvstore
Creating table django_comments
Creating table django_comment_flags
Creating table tagging_tag
Creating table tagging_taggeditem
Creating table blog_newslettersubscription
Running deferred SQL...
Traceback (most recent call last):
File "/home/user/workspace/project/lib/python3.4/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: relation "app_user" does not exist.
The app app
is where I have my AUTH_USER_MODEL
, i.e in my settings.py
:
AUTH_USER_MODEL = 'app.User'
and in my app/models.py
:
class User(AbstractBaseUser):
[...]
I have read a lot of questions like this, this, this, this and also this. and I have searched a lot, but I can't find an solution to my problem (none of them worked).
The weird thing is that if I check the database (Postgresql), the table exists. Executing:
SELECT relname, reltuples, relpages * 8 / 1024 AS "MB" FROM pg_class ORDER BY relpages DESC;
returns:
relname | reltuples | MB
... | |
app_user | 4034 | 0
... | |
Any clues? Any help would be much appreciated! Thanks in advance.
Update:
My INSTALLED_APPS
:
INSTALLED_APPS = (
'grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.gis',
'crispy_forms',
'rosetta',
'django_extensions',
'django_slack',
'filebrowser',
'mptt',
'corsheaders',
'actstream',
'compressor',
'sorl.thumbnail',
'geoposition',
'reversion',
'rest_framework',
'rest_framework.authtoken',
'rest_framework_swagger',
'rest_auth',
'django_comments',
'tagging',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'rest_auth.registration',
'import_export',
'oauth2_provider',
'places',
'tasks',
'transmeta',
'app',
)