I've recently migrated to postgresql, I was not sure about the cause of the problem but column does not exist error is showing up.
ProgrammingError at /admin/mtsauth/authorms/ column mtsauth_authorms.nihgrants does not exist LINE 1: ..."secfirstname", "mtsauth_authorms"."seclastname", "mtsauth_a...
this is migrations file
migrations.CreateModel(
name='AuthorMS',
fields=[
('firstname', models.CharField(max_length=120)),
('lastname', models.CharField(max_length=120)),
('ArticleId', models.AutoField(primary_key=True, `enter code here`serialize=False)),
('secfirstname', models.CharField(blank=True, default='None', max_length=120)),
('seclastname', models.CharField(blank=True, default='None', max_length=120)),
('nihgrants', models.BooleanField(default=False)),
('country', models.CharField(choices=[('INDIA', 'INDIA'), ('US', 'USA'), ('UK', 'UK'), ('RUSSIA', 'RUSSIA')], max_length=50)),
('seccountry', models.CharField(blank=True, choices=[('INDIA', 'INDIA'), ('US', 'USA'), ('UK', 'UK'), ('RUSSIA', 'RUSSIA')], default='None', max_length=50)),
('affliation', models.CharField(default='None', max_length=100)),
('secAffliation', models.CharField(blank=True, default='None', max_length=100)),
('code', models.IntegerField(default=101, max_length=10000)),
],
),
Your changes are not fully reflected in the database. This could be because you have not migrated to the database. Be sure you provide value for non-nullable fields to your model by giving them a default value. You can check the status of a migration by running the following command:
python manage.py showmigrations <your_app_name>
This will show the list of migrations. The one without the X to the left of migration is the one you have missed to migrate.