I'm using django 1.8 in my project and it seems like the auth models are not being created. I have applied the auth migrations and I get;
python manage.py migrate --database=default auth
Operations to perform:
Apply all migrations: auth
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
But only the django_content_type table is created. Am also using Postgres. Can anyone please give me pointers on how I can solve this. Thank you.
edit: running ;
python manage.py createsuper
part of error dump
django.db.utils.ProgrammingError: relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...
Edit
settings.py
....
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
........
DATABASES = {
'default': {
'NAME': 'dbname',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': 'theuser',
'PASSWORD': 'thepassword',
'HOST':'thehost'
},
'auth_db': {
'NAME': 'dbname',
'ENGINE': 'django.db.backends.mysql',
'USER': 'otheruser',
'PASSWORD': 'thepassword',
'HOST':'thehost'
}
}
....
Am using 2 database connections where the mysql database is used to authenticate existing users. The idea is to use already existing users on the mysql database on the new application.
Applying auth.0001_initial... OKthis tells me the auth table is created. Or do you mean it doesn't exist in the database itself? Have you tried creating a user?