Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've been having lots of problems with South, I just can't add new fields.

So this is what I did:

  • dropped the south_migrationhistory table from the database, deleted all the migration folders and uninstalled south "pip uninstall south".
  • then, installed south again.
  • ran syncdb to create the south table on the db.
  • converted_to_south the app where I want to add the fields. (everything working fine till this point)
  • ran schemamigration app --auto. And it gave me the regular message "+added field ... you can now apply this migration with .manage.py migrate app"
  • did "python manage.py migrate app".

Get this error:

ProgrammingError: column "profile_image" of relation "profiles_profiles" already exists. (the new fields I want to add are called "nickname" and "profile_image", the app name is called "profiles" and the model is called "profiles" as well).

I think I'm doing exactly what the docs write.

What I have tried:

  • deleting everything and starting again a couple of times.

  • faking a migration and then running "migrate" again. (I get "nothing to migrate", and then the same error "relation already exists")

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
834 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...