• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

681
Views
Django ProgrammingError column does not exist

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)),
            ],
        ),
about 3 years ago · Santiago Trujillo
1 answers
Answer question

0

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.

about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error