#470: Add Field.db_default for defining database defaults
-------------------------------------+-------------------------------------
Reporter: jws | Owner: Lily
| Foote
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: normal | Resolution: fixed
Keywords: sql schema | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):
In [changeset:"37284896f08e120505c8c01918b9d6bba03c2204" 3728489]:
{{{#!CommitTicketReference repository=""
revision="37284896f08e120505c8c01918b9d6bba03c2204"
Refs #470 -- Fixed further field_defaults test failures due to year-end
boundary conditions.
Follow-up to 352d860b9107adbcde0f1fe5d0fce8e9090a51e4.
Overriding USE_TZ=True during a test creates drift between the SQL
compiled
for inserted values versus the deployed database default, as Extract()
inquires
of the current timezone.
To resolve this, leave USE_TZ=False and make UTC explicit when asserting
the result.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/470#comment:73>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019cfc32c3ea-39fb0792-f0ad-4c94-84e1-7837c652936f-000000%40eu-central-1.amazonses.com.