Search code examples
pythondjangopostgresqldjango-modelsdjango-migrations

column <column> does not exist (Django 1.8)


I am trying to interact with the development server for my django project. However any page on the server returns the same error:

Exception Type: ProgrammingError

Exception Value: column myApp_verb.date does not exist

I had not recently added the field date to the model verb (it's been there for a while, and I'm not sure what caused this error to begin). My collaborators all have identical files on their local machines, and none of them are having any issues.

I have tried various things:

I have tried removing the date field (and all references to it). makemigrations did not detect any changes, and migrate failed with error:

django.db.utils.ProgrammingError: column "date" does not exist

I have tried renaming the field. Once again makemigrations did not detect any changes, and migrate failed with the same error as above.

I have tried deleting all of my migrations. This changed nothing.

I'm out of ideas at this point. Any help would be much appreciated.

Thanks in advance!

Edit: Here is the verb class, as requested. Its pretty simple:

class Verb(models.Model):
    english_gloss = models.CharField(max_length = 20)
    first_person = models.CharField(max_length = 20)
    second_person = models.CharField(max_length = 20)
    third_person = models.CharField(max_length = 20)
    fourth_person = models.CharField(max_length = 20)
    transitivity = models.BooleanField()
    classifier = models.CharField(max_length = 20)
    inner_lexical = models.CharField(max_length = 20)
    outer_lexical = models.CharField(max_length = 20)
    perfective = models.CharField(max_length = 20)
    imperfective = models.CharField(max_length = 20)
    date = models.DateTimeField(auto_now_add = True)

Solution

  • I still have no idea why this error began, but it appears that there was some sort of corruption in my database. I deactivated the db and started a new one, and everything works perfectly again.