#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.
Django 3.x generates sql with drop default:
```
ALTER TABLE "x" ADD COLUMN "y" integer DEFAULT 0 NOT NULL CHECK
("y" >= 0);
ALTER TABLE "x" ALTER COLUMN "y" DROP DEFAULT;
```
The whole thing is about not adding DROP DEFAULT. How about some kind of
option for database backend?
--
Ticket URL: <https://code.djangoproject.com/ticket/470#comment:28>
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.4925773f17ab62a5585d4b3ce61a2fff%40djangoproject.com.