I have a simple model for a product that looks like this:
class Product(models.Model): name = models.CharField(max_length=80)
We already have this minimized, and we have a database with these fields. I want to change this model to inherit from a base class that looks like this:
class BaseProduct(models.Model): name = models.CharField(max_length=80) class Meta(object): abstract = True
And change the Product class as follows:
class Product(BaseProduct):
Based on my understanding of abstract base classes, these two settings will create the same tables (right?). So technically, after changing this model, I did not need to make any changes to the database. However, when I try to apply it using the South, he wants to reset the "name" column of the Product table.
Since we already have these tables, I would ideally want to keep the "name" column, and not use other solutions (like OneToOneField).
Thanks!
source share