#22512: Adding auto_now field to model causes migrate exception
---------------------------------+--------------------------------------
Reporter: jaddison | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-beta-1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by jaddison):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
As an additional note, would it not be wise to use `timezone.now()` if
time zone support is active? (see
https://docs.djangoproject.com/en/1.7/topics/i18n/timezones/#naive-and-
aware-datetime-objects)
After fixing the migration to use `datetime.datetime(...)` in the original
bug report, the migration runs fine, however I get this warning:
{{{
...
Applying
content.0003_contentlink_updated.../Users/jaddison/.virtualenvs/project1/lib/python2.7
/site-packages/django/db/backends/sqlite3/base.py:63: RuntimeWarning:
SQLite received a naive datetime (2014-04-25 04:32:56.089929) while time
zone support is active.
RuntimeWarning)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22512#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/066.73aa3c34f4171824683929b60a5df30a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.