我已经做了:
python manage.py schemamigration TestDBapp1 --initial
python manage.py schemamigration TestDBapp1 --auto
成功地。
但如果我输入:python manage.py migrate TestDBapp1
我明白了:sqlite3.OperationalError: table "TestDBapp1_xyz" already exists
可能是什么问题呢?
我怀疑你已经被处决了syncdb
创建了表。南方试图在期间再次创造它们migrate
数据库自然会抱怨。
为了避免这种情况,你必须告诉南“fake http://south.aeracode.org/docs/convertinganapp.html?highlight=fake“最初的迁移。
python manage.py migrate TestDBapp1 --fake
顾名思义,它假装迁移。请注意,这是一个一步。南方将掌控你的未来syncdb
and migrate
无需--fake
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)