#470: Add Field.db_default for defining database defaults
-------------------------------------+-------------------------------------
Reporter: jws | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version:
(models, ORM) |
Severity: normal | Resolution:
Keywords: sql schema | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Marcin Nowak):
Hi. 15 years have passed since this important bug report. Every time we're
uploading new version of the application, which includes new not nullable
fields in db tables, our service is failing. Db changes are applied first,
then app services are restarting on all servers (it takes few minutes).
During this time old version loaded into memory is failing due to missing
defaults:
{{{
IntegrityError
null value in column "X" violates not-null constraint DETAIL: Failing row
contains (...)
}}}
For us, default values must be set at the database layer. Please add
support of db_default attribute.
--
Ticket URL: <https://code.djangoproject.com/ticket/470#comment:30>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/061.734e4564a174f92daa76a6f1eefe066a%40djangoproject.com.