You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and thank you for your great package.
I've faced a little problem with migrating when I set new parent class for my polymorphic subclass. Here is an example:
before:
class Exam(PolymorphicModel):
# Exam model fields ...
after:
class ParentExam(PolymorphicModel):
# some new fields ...
class Exam(ParentExam):
# changes in exam fields
After these changes, I can't migrate cause I have to populate 'parentexam_ptr_id' field for exam model in my migrations and there is no easy way to set or make default ParentExam model for each Exam instance.
I've found several answers but they all recommended to duplicate my database (like this one).
I'm looking for much easier and more sensible ways to solve this problem. Thank you in advance.
This discussion was converted from issue #484 on December 13, 2025 17:19.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello and thank you for your great package.
I've faced a little problem with migrating when I set new parent class for my polymorphic subclass. Here is an example:
before:
after:
After these changes, I can't migrate cause I have to populate 'parentexam_ptr_id' field for exam model in my migrations and there is no easy way to set or make default ParentExam model for each Exam instance.
I've found several answers but they all recommended to duplicate my database (like this one).
I'm looking for much easier and more sensible ways to solve this problem. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions