#28141: When have null=True inside ForeignKey, Django don't to do CASCADE
Operation
even passing on_delete=models.CASCADE. [using PostgreSQL]
-------------------------------------+-------------------------------------
Reporter: mateuspadua | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ForeignKey null | Triage Stage:
True PostgreSQL | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by mateuspadua):
Thanks for replay:
I did more tests and i figure out that my constraint was without the
options Deferrable and Deferred assigned, because my current DB PostgreSQL
was migrate from MySQL. Then I assigned this options manually on DB and
worked.
[[Image(https://drive.google.com/file/d/0B7FKYDMJBG3bVVBCM1k3X0tsUEk/view?usp=sharing)]]
More information about this options on the link bellow:
http://stackoverflow.com/questions/16323236/deferrable-check-constraint-
in-postgresql
I hope this can help.
--
Ticket URL: <https://code.djangoproject.com/ticket/28141#comment:5>
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/069.96a269b5980e2ff400f9a4946038144d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.