0

我在运行 Syncdb 时得到了这个

lex@lex-pc:~/projects/next$ ./manage.py syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django_filters

Not synced (use migrations):
 - django.contrib.auth
 - django.contrib.contenttypes
 - django.contrib.sessions
 - django.contrib.messages
 - django.contrib.staticfiles
 - django.contrib.admin
 - django.contrib.admindocs
 - south
 - etta
 - sorl.thumbnail
 - schlib
 - admin
 - gart
 - school1
 - school2
(use ./manage.py migrate to migrate these)

当我这样做时,./manage.py migrate school1我得到DatabaseError: relation "south_migrationhistory" does not exist. 这些应用程序具有迁移目录,其中包含迁移。这是南方的问题吗?

4

1 回答 1

0

我让它工作了。我不确定它是否是最佳做法。

我所做的是评论所有应用程序,除了south, Then run ./manage.py syncdb --all。该south_migrationhistory表已创建,然后取消注释应用程序,run ./manage.py migrate所有应用程序都是migrated.

于 2013-09-03T23:51:25.920 回答