Django syncdb and migrate

前端 未结 4 848
春和景丽
春和景丽 2020-12-28 18:41

I\'m moving django website from one server to another, and I tried to syncdb, so i\'ve put python manage.py syncdb, and i get this output:

Synci         


        
4条回答
  •  隐瞒了意图╮
    2020-12-28 19:28

    This might help others going through the same issue.

    Since your database is to be created now and there are no migrations needed, after doing what Ahmad mentioned, also do a fake migration so south will mark all migration scripts as already run. In short, run these.

    syncdb --all
    migrate --fake
    

    Please note that if you already have data in your database you shouldn't use syncdb --all.

提交回复
热议问题