From 8e4da9b8f91fb7a14235871683c4123794d4aad7 Mon Sep 17 00:00:00 2001 From: Johanan Oppong Amoateng Date: Fri, 26 Dec 2025 22:40:47 +0000 Subject: [PATCH] add warning to docs about renaming superclass which causes migrations problems --- docs/migrating.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/migrating.rst b/docs/migrating.rst index c556ffda..a17a6651 100644 --- a/docs/migrating.rst +++ b/docs/migrating.rst @@ -79,3 +79,13 @@ When the model is created elsewhere, you can also use the reset_polymorphic_ctype(Base, Sub1, Sub2) reset_polymorphic_ctype(Base, Sub1, Sub2, ignore_existing=True) + + +Renaming Polymorphic Models +============================ + +.. warning:: + + Renaming a polymorphic base class is a complex operation that requires manual migration editing. + Django's automatic migration generation does not properly handle renaming models with multi-table + inheritance, which can lead to invalid SQL and data loss. \ No newline at end of file