I have implemented a CustomUser model on users app in django.
class CustomUser(AbstractUser):
username = None
email = models.EmailField('email address', unique=True)
first_name = models.CharField('First Name', max_length=255, blank=True,
null=False)
last_name = models.CharField('Last Name', max_length=255, blank=True,
null=False)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']
def __str__(self):
return f"{self.first_name} {self.last_name}"
And then when running "python manage.py migrate", I got this error "django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database 'default'."