[Django]-Django 1054 โ€“ Unknown Column in field list

0๐Ÿ‘

โœ…

I believe this was because the migration scripts were getting called out of order, due to a problem I had setting them up. Everything is ok now.

๐Ÿ‘คskaz

0๐Ÿ‘

Unless the new column has a default value defined, the insert statement will expect to add data to that column. Can you move the data load to be after the second migration. (I would have commented, but do not yet have sufficient reputation.)

๐Ÿ‘คdevinformatics

0๐Ÿ‘

This happened to me because I faked one migration (m1), created another (m2), and then tried to migrate m2 before I had faked my initial migration (m1).

So in my case I had to migrate --fake <app name> m1 and then migrate <app name> m2.

๐Ÿ‘คJames111

0๐Ÿ‘

I faced the same issue all what i do to get out this issue just drop all tables in my DB and then run:

python manage.py makemigrations

and :

python manage.py migrate

๐Ÿ‘คMahmoud Abbas

Leave a comment