Hi, I think I may discovered a bug in django, but I’m not sure
[03:19am] The bug is this: 1. You make a ManyToManyField related the same model in wich you are creating the field
[03:20am] Example:
[03:21am] class WhatEver(models.Model):
field = models.ManyToManyField(‘Whatever’, related_name=‘related_rel_name’)
[03:22am] this creates an appname_whatever table and and an appname_whatever_fields table in the database that contains to fields: from_whatever_id and whatever_id
[03:24am] Obviously takes the word from_ in the first field to difference from the second field
[03:24am] The bug:
[03:24am] If I change the field in the model to b.e
field = models.ManyToManyField(AnotherObject, related_name=‘related_rel_name’)
[03:26am] and I make migrations and migrate, the db table field whatever_id changes to anotherobject_id, but the field from_whatever_id remains intact
[03:28am] when you use the relation in your proyect you get an error like "theres no appname_whatever_fields.whatever_id"
[03:28am] I had to rename manually from_whatever_id to whatever_id
[03:28am] Check it, please