﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21257	ForeignKey on_delete functionality should traverse (cascade, ha ha) to the DB backend	gcbirzan	nobody	"By default, django creates FKs without an explicit ON DELETE on the backend. This, if nothing else, should be configurable. If for no other reason that when using some transaction isolation modes, the error returned by the backend will be the wrong one during concurrent modifications:

Table b links to table a. You insert in table b a link to ID 1 in a, at the same time as you delete it from a.

With the default (at least in PostgreSQL), in REPEATABLE READ, the error is IntegrityError, which is wrong, since in fact you should just retry the transaction. In lower isolation levels, the FK is deleted (as expected), though, granted the on delete signals are not called."	New feature	closed	Database layer (models, ORM)	dev	Normal	duplicate			Accepted	0	0	0	0	0	0
