#28715: Prevent a migration changing DateTimeField(auto_now_add=True) to
default=timezone.now from generating SQL
--------------------------------------+------------------------------------
     Reporter:  Дилян Палаузов        |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Дилян Палаузов):

 * Attachment "auto_now_add_skip_sql_calls.patch" added.

 Probably somebody with more experience will tweak the
 
test.migrations.test_autodetector.test_add_date_fields_with_auto_now_add_(not_asking_for_null_addition,
 add_asking_for_default) tests, so that the line "kwargs['auto_now_add'] =
 True" in django/db/models/fields/__init__.py can be removed.  But
 otherwise this shall be ready to go.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28715>
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/072.e41c715e318f36b09770f9ca541fa1d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to