Extending auth.User in an existing project

AUTH_USER_MODEL = "auth.User"
from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
      SUPERADMIN = 0
      ADMIN = 1
      SALES = 2
      ROLE_CHOICES = (
          (SUPERADMIN, 'Super Admin'),
          (ADMIN, 'Admin'),
          (SALES, 'Sales'),   
      role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, blank=True, null=True)

Will this not work on an existing django project ?

It looks like I have to DROP DATABASE and delete all the migrations files in \migrations folder and then only it seems to work.

Wondering how I can incorporate this in an existing Django Project.

Not easily and not automatically.

See Changing to a custom user model mid-project

The general recommendation tends to be that if you need to effectively extend the User model in an existing project, you want to go with the “Profile” model solution.

Side note: I strongly encourage using Django’s built-in Group model for role-based security features. Overall, it makes managing permissions a lot easier than a roll-your-own implementation on an on-going basis.