title: Unique email constraint for django.contrib.auth.user
body: <p>I have changed django.contrib.auth.user model where I have made the email id to be unique. After which I added a datamigration to reflect the same-</p>
  
  <ul>
  <li><p>python manage.py datamigration appname unique_password.
  Followed by python manage.py schemamigration appname --auto-->no changes. Finally, python manage.py migrate appname.</p></li>
  <li><p>Migrating forwards to 0003_unique_password</p></li>
  <li>
  appname:0037_unique_password.py</li>
  </ul>
  
  <p>Now when I add a user whose email is not unique, it gives me an error and does not let me create the user through the <strong>django admin</strong>. But when i do:
  ></p>
  
  <ul>
  <li><p>python manage.py shell</p></li>
  <li><p>from django.contrib.auth.models import User</p></li>
  <li>
  user=User('cust1','123','xxx@gmail.com')
  This creates a user object even though 'xxx@gmail.com' already exists.</li>
  </ul>
  
  <p>How can I add an unique constraint to django.contrib.auth.user.email for an existing project (with data)?</p>