Yuqing  Wei Yuqing Wei - 2 years ago 116
Python Question

Django1.6 migrates with South

I'm using Django 1.6 in a project, I'd like to add a column "number" in my table(model) "Tag". After having added this column in model.py, I run the command:

python manage.py schemamigration myapp --auto

But I've got an error when I enter in the table "Tag" in the backend : "number: no such column". It seems that the migrate didn't worked.

How can I do with that? Thanks!

Answer Source
python manage.py schemamigration myapp --auto

will only create a migration file for your model change. You'll need to run

python manage.py migrate myapp

to apply the migration

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download