It appears that add_to_class() https://github.com/django/django/blob/master/django/db/models/base.py#L218 doesn’t actually add a column, but adds a field to the _meta member init.py#L249″>https://github.com/django/django/blob/master/django/db/models/fields/init.py#L249. How come those fields shown up as columns in phpmyadmin though?
It appears that add_to_class() https://github.com/django/django/blob/master/django/db/models/base.py#L218 doesn’t actually add a column, but adds a field
Share
You need to run
syncdbor if it’s an existing table, you’ll need to create a migration with South, or manually alter the table yourself to match the model changes introduced byadd_to_class.