Open dennis-bor opened 9 months ago
May be this one is even better: https://docs.djangoproject.com/en/4.2/howto/writing-migrations/#changing-a-manytomanyfield-to-use-a-through-model
The code in https://github.com/tsg-humlab/shewrote/commit/403e2de459aa56658355c4291c33cc7e5ee9b247 seems to do the trick. I am only in doubt about the related_name
arguments in the from_person
and to_person
fields of PersonPersonRelation
. @dennis-bor could you shine your light on this?
See #29
This Stackoverflow page may come in handy: https://stackoverflow.com/questions/33257530/how-to-add-through-option-to-existing-manytomanyfield-with-migrations-and-data-i