Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
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)),
            ],
        ),
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

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.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda