Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Django error: multiple default values for specified column "id"

I'm working with a project with docker-compose, where I have a postgre container.

When I run:

docker-compose -f dev.yml run django python manage.py migrate

I get the error:

django.db.utils.ProgrammingError: multiple default values specified for column "id" of table "scrapy_scrapy"

That is happening before I made some changes to my models.py file. But now the file is correct and should be working. This is the content of the models.py file:

from django.db import models
import django

# Create your models here.
class Scrapy(models.Model):
    user = models.CharField(max_length=50,blank=True)
    password = models.CharField(max_length=50,blank=True)
    projecte = models.CharField(max_length=100)
    estat_last_check = models.CharField(max_length=700, default="", blank=True)
    date = models.DateTimeField(default=django.utils.timezone.now, blank=True)

    app_label = ''
    def __str__(self):              # __unicode__ on Python 2
        return self.projecte + " - " + self.user

    class Meta:
        app_label = 'scrapy'

As you can see, no id filed is defined anymore, so, why is complaining about that field?

I've done my research and tried some possible solutions, but no luck. I've already tried deleting the full Docker container and creating it again, or trying to delete the database.

Any ideas?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!