#30390: makemigrations requires default when adding non-nullable field even when
there are no rows.
-------------------------------------+-------------------------------------
Reporter: Neil du Toit | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: wontfix
Keywords: makemigrations | Triage Stage: Accepted
default null |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* status: assigned => closed
* version: 2.2 => master
* resolution: => wontfix
Comment:
Thanks for the report, however this is expected behavior. `makemigrations`
cannot be based on the number of rows in the current database because in
most of cases you will prepare migrations on one environment (e.g. dev or
test) and run them on another (e.g. other dev, test, live etc.). Moreover
even on the same db the number of rows can change between preparing
migrations and running them.
--
Ticket URL: <https://code.djangoproject.com/ticket/30390#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.8548aa5e7e8b3ce6b2926d78051fffed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.