Question: I created a CustomUser model, inheriting from AbstractEmailUser.  

I wanted to add an avatar field, after finishing it and making migrations but I'm getting the following error: 

```
column account_customuser.avatar does not exist
LINE 1: ...user"."name", "account_customuser"."valid_email", "account_c...

```

**models.py** looks like this now

```
class CustomUser(AbstractEmailUser):
    nickname = models.CharField('nickname', max_length=100, unique=True)
    name = models.CharField(max_length=200, blank=True, null=True, default=None)
    valid_email = models.BooleanField('valid email', default=False, blank=True)
    avatar = models.ImageField(upload_to='profile/photo', blank=True, null=True, default=None)

```

What can I do to correctly add the avatar field?

Answer: 
As stated here: [Django Programming error column does not exist even after running migrations](https://stackoverflow.com/questions/42613536/django-programming-error-column-does-not-exist-even-after-running-migrations?answertab=votes#tab-top)

Something may have gone wrong in your migration process.

1. Go to your database and find a table named `django_migrations` where
all the migrations are listed.
2. Find the row with the migration in which you added the `avatar` column to your model and delete it from the database (only the row).
3. Migrate again: `./manage.py migrate`

---

Another possibility is that you are using `Django Toolbar` like what happened here: [Django Migration Error: Column does not exist](https://stackoverflow.com/questions/33681952/django-migration-error-column-does-not-exist), in which case you need to comment the toolbar in your installed apps and rerun migrations.
Did you apply a new migration with these changes? 
You can check this using `showmigrations` or use `makemigrations` to create a migration and `migrate` to apply it.