I'm trying to use South to add a new URLField to a model, like:
class Document(models.Model):
text = models.TextField()
reference_page = models.URLField(blank=True, null=True)
source_page = models.URLField(blank=True, null=True) # new field
However, when I run python manage.py schemamigration myapp --auto
I get the error:
DatabaseError: column myapp_document.source_page does not exist
LINE 1: ...ext", "myapp_document"."reference_page", "myapp_doc...
I'm using PostgreSQL as my DB backend. I properly initialized my app for South and have already run migrations for it. I've made sure my Django and South installs are up to date.
Why would it be giving me this error now?
Edit: Oddly, if I manually created the column in the database, the schemamigration
call succeeds, but of course the migrate
call fails until I manually remove the column. This is bizarre.