0
votes

I have added new fields to model and tried "python manage.py makemigrations" . It gave me below error. Can anyone help me?

model added

pm_comments = models.TextField(null=True, blank=True,verbose_name='PM Comments') archived = models.BooleanField(default=False,blank=True,verbose_name='Archived')

django.db.utils.ProgrammingError: ('42S22', "[42S22] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name 'pm_comments'. (207) (SQLExecDirectW); [42S22] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name 'archived'. (207)")

1
makemigrations and then migrate. LEt me know if it worked! - Charanjit Singh
makemigrations is not successful which is giving me above error - mahesh
Can you update your question with the model changes you made? - wogsland
What about the column archived? - wogsland
Useful reading for making your question answerable: stackoverflow.com/help/minimal-reproducible-example - wogsland

1 Answers

0
votes

It looks like you haven't run the migration you created with

python manage.py migrate