I have a django model (say model1) where I have my own primary key, but now I want to change the primary key to default id field. But the problem if I try to change is, I have another model (say model2) which has many to many dependency to the model1 and it is causing errors when I am trying to modify the field.
Is there any way I can change the primary key of this model?
ex:
class model2(models.Model):
id = ..
...
model1 = models.ManyToManyField("model1", blank=True)
classs model1(models.Model):
Name = models.charField(primary_key=True, max_length=280)
..
Now I want to change the primary key of model1 back to Id.