Opened 10 years ago
Closed 10 years ago
#25988 closed Cleanup/optimization (wontfix)
Change django.db.models.deletion.CASCADE to django.db.models.deletion.PROTECT while creating migrations
| Reported by: | Saurabh Agrawal | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | 1.9 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
By default, on deletion, the changes shouldn't be cascaded, but protected. Results in loss of data if the migrations generated are not checked carefully.
Note:
See TracTickets
for help on using tickets.
Thanks for the suggestion, but it's obsolete because Django 1.9 deprecates the default value for
on_deleteso that in Django 2.0, the developer must specify a value.