fields are not null by default, so you don't need:
null=False
-- null=False
that's why makemigrations doesn't detect changes in the MyModel model.
L
Il giorno mercoledì 26 settembre 2018 13:16:24 UTC+2, jisson varghese ha scritto:
Il giorno mercoledì 26 settembre 2018 13:16:24 UTC+2, jisson varghese ha scritto:
I have model MyModel in app app1class MyModel(models.Model):...........name = models.CharField(max_length=10, unique=True) I have made the following change,class MyModel(models.Model):...........name = models.CharField(max_length=10, unique=True, null=False) python manage.py makemigrations - create migration in file different app, and no there is no changes in that model.When I tried manage.py makemigrations app1 - No changes detected in app 'app1'
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/97554e80-b497-4fc6-be6d-e4fa84b1addd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment