IntegrityError at /admin/userauths/user/add/

I Clean the database this will clean all the database data including superuser

python manage.py flush

I Run the migrations

python manage.py makemigrations
python manage.py migrate

I Now create a superuser

python manage.py createsuperuser

and it works for me

1 Like