I have a web app I've been managing for months, and I attempted to make some updates on my app. I added new fields to the existing class, but django raised an error.
These are what I've done.
1. Added a new field to an existing model.
class ExistingModel(models.Model):
# Existing Fields
new_field = models.IntegerField()
2. Attempted to make migration
$ python manage.py makemigrations
However, it raised django.db.utils.OperationalError: no such column
during this process.
- I added
django.contrib.sites
toINSTALLED_APPS
insettings.py
. - My django version is 2.0.3.
How can I add new fields to the existing model?