Do you need that '--update' parameter?

On Fri, 7 Apr 2023 at 05:57, Saifullah Shahen <shahriar...@gmail.com> wrote:

> in my custom user model, initially, my model looks like this
>
> class User(AbstractUser, BaseModelWithUUID):
>     phone = models.CharField(max_length=11,
> validators=[validate_phone_number])
> I do command "makemigrations" which create a initial migration file
>
> but after updating my model like this
>
> class User(AbstractUser, BaseModelWithUUID):
>     phone = models.CharField(max_length=11,
> validators=[validate_phone_number])
>     name = models.CharField(max_length=255)
>
> after adding a field "name" when i run "makemigrations --update" it shows
> a error:
>
> CommandError: Cannot update applied migration
> 'authentication.0001_initial'.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/793fee18-1231-456b-8d91-f976bebad5e2n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/793fee18-1231-456b-8d91-f976bebad5e2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFKhtoS4wer5PRzA-G%3D1MvOMV8S2oGnMRZ83PTQ6fy3DukWzdQ%40mail.gmail.com.
  • Dja... Saifullah Shahen
    • ... Dipankar
    • ... Muhammad Juwaini Abdul Rahman
      • ... David Wobrock
        • ... 'Adam Johnson' via Django developers (Contributions to Django itself)

Reply via email to