I have a simple model for a product that looks like this:
class Product(models.Model):
name = models.CharField(max_length=80)
# other attributes
We already have this rolled out, and have a DB with these fields filled out. 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 modify the Product class like so:
class Product(BaseProduct):
# other attributes
Based on my understanding of Abstract Base Classes, these two setups will create the same tables (right?). So technically, after changing this model, I shouldn't have to do any modifications in the database. However, when I try to apply it using South, it wants to drop the 'name' column of the Product table.
Since we already have these tables rolled out, I would ideally like to keep the 'name' column, as opposed to using other solutions (like a OneToOneField).
Thanks!