I have been using django for many years but have not seen such issue before.
I am working on an old/legacy project. And I am originally facing this issue. So as the solution suggest, I run auth
migrations first,
$python manage.py migrate auth
Operations to perform:
Apply all migrations: auth
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
But when I check my mysql database, only django_migrations
table gets created. I don't see auth_user
, auth_group
, auth_permissions
, etc.
$python manage.py showmigrations auth
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
mysql> show tables;
django_migrations
I am using Python3.6
and Django==1.11.5
. My INSTALLED_APPS
looks like this,
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'debug_toolbar',
'djcelery',
'widget_tweaks',
'djangosaml2',
# ... more apps from my project
]
What could be wrong? Has anyone come across such issue.