#23678: Database default not removed if default=None
---------------------------------+------------------------------------
     Reporter:  timgraham        |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Migrations       |                  Version:  1.7
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by paulcdejean):

 Not exactly accurate:

 * Every varchar column will have DEFAULT NULL if it's created on the
 inital migration, regardless of the value of the "default" keyword
 argument.
 * Every varchar column created as part of a non initial migration will
 have DEFAULT NULL if the "default" keyword argument is equal to None.
 * A varchar column that has its attributes changed that is DEFAULT NULL in
 the database will revert from DEFAULT NULL to no default if the "default"
 keyword argument is not None.
 * A varchar column that has its attributes changed that is DEFAULT NULL in
 the database will remain DEFAULT NULL if the "default" keyword argument is
 None.
 * A varchar column that has no default in the database will continue to
 have no default regardless of its "default" keyword argument. Meaning it
 will not at any point go back to DEFAULT NULL.

--
Ticket URL: <https://code.djangoproject.com/ticket/23678#comment:1>
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/067.081d4375c956a58193491f3c08fdb893%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to