You are adding a non-null field to a table, so the existing rows from
that table need a value to put in it to enforce the non-null rule.

If you select 1, you type that value, and it is used for all
previously existing rows in the table.

On 5/6/17, Er. Rv Ranga <errvrang...@gmail.com> wrote:
>  python manage.py makemigrations blog
>
> You are trying to add a non-nullable field 'body' to post without a
> default; we can't do that (the database needs something to populate
> existing rows).
> Please select a fix:
>  1) Provide a one-off default now (will be set on all existing rows with a
> null value for this column)
>  2) Quit, and let me add a default in models.py
> Select an option:
>
> what is this and how we solve it
>
> --
> 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+unsubscr...@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/4fd75ea1-3963-45bb-8411-7e3edf7d960c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CALn3ei1FAHx06cRLN4EnV-y3jjky8BSWMk_Q92X13qD1SefDXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to