remove django polymorphism

79 views
Skip to first unread message

Joseph Amiri

unread,
Jul 16, 2022, 3:41:44 PM7/16/22
to Django users
hey all.
i have models like this :
class basemodel(polymorphism):
...
class teachers(basemodel):
...
class courses(basemodel):
...
now i want to remove teachers from polymorphism basemodel and transfer records from basemodel to teachers table. any document to do that ?

Mike Dewhirst

unread,
Jul 16, 2022, 10:48:49 PM7/16/22
to django...@googlegroups.com




--
(Unsigned mail from my phone)

Yes. Django has you totally covered. You need to look at docs.djangoproject.com and search "migrations".

Essentially, you write the code to move records between tables according to your heart's desire. On that page there is a section called 'Data migrations' which will solve your problem.

Good luck

M

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1bd0a2bd-8521-43a6-8fc8-aa6e92feafe2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages