My code snippet is as follows:
class Table1(models.Model):
name = models.CharField(max_length=20)
class Table2(models.Model):
name = models.CharField(max_length=20)
description = models.TextField()
table1 = models.ForeignKey(Table1)
Consider that the table has data in the database. What is a possible way to convert a field Foreign Key Field(in Table2)to Many To Manywithout losing existing data in the database?
*Note: I am using Django 1.6.4(not using Django migrations)*
source
share