﻿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
37260	AlterField changing only a Python-level on_delete option performs unnecessary DDL	Adam Johnson	Adam Johnson	Database-level delete options, added in #21961, made an `AlterField` that changes only the Python-level `on_delete` option of a `ForeignKey` (e.g. `CASCADE` to `PROTECT`, or `SET_NULL` to `CASCADE`) execute real DDL. On most backends the foreign key constraint is dropped and recreated, and on SQLite the whole table is rebuilt. In 6.0 such migrations were database no-ops: the `AlterField` operation was generated for state, but `BaseDatabaseSchemaEditor._field_should_be_altered()` returned `False`, so previously-free migrations become expensive and locking after upgrading to 6.1.	Bug	assigned	Database layer (models, ORM)	6.1	Release blocker				Unreviewed	1	0	0	0	0	0
