﻿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
36645	PostgreSQL migration regression: `InternalError: cannot drop column id of table ... because other objects depend on it`	Adam Johnson	Adam Johnson	"When testing a client project on Django 6.0, its migrations fail to run, crashing with an exception like:

{{{
django.db.utils.InternalError: cannot drop column id of table library_book because other objects depend on it
DETAIL:  constraint ratings_rating_book_id_9d017958_fk_library_book_id on table ratings_rating depends on column id of table library_book
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
}}}

The exact conditions:

1. PostgreSQL (tested on 15 and reproduced on 18)
2. A model that has been migrated from vanilla to use multi-table inheritance
3. A model in another app that FK's to the first model, with its migration dependency on the first models' first migration.

Reproducer repository incoming."	Bug	assigned	Migrations	6.0	Release blocker				Unreviewed	0	0	0	0	0	0
