我在syncdb之后得到这个:
clime@den /var/www/loserti $ ./manage.py syncdb
Syncing...
Creating tables ...
Creating table tagging_tag
Creating table tagging_taggeditem
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.messages
> django.contrib.staticfiles
> django.contrib.admin
> django.contrib.admindocs
> django.contrib.flatpages
> debug_toolbar
> filebrowser
> grappelli
> tagging
> south
Not synced (use migrations):
- photologue
- web
(use ./manage.py migrate to migrate these)
所以我运行迁移:
clime@den /var/www/loserti $ ./manage.py migrate
Running migrations for photologue:
- Nothing to migrate.
- Loading initial data for photologue.
Installed 0 object(s) from 0 fixture(s)
Running migrations for web:
- Nothing to migrate.
- Loading initial data for web.
Installed 0 object(s) from 0 fixture(s)
但是syncdb的结果还是一样的:
clime@den /var/www/loserti $ ./manage.py syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.messages
> django.contrib.staticfiles
> django.contrib.admin
> django.contrib.admindocs
> django.contrib.flatpages
> debug_toolbar
> filebrowser
> grappelli
> tagging
> south
Not synced (use migrations):
- photologue
- web
(use ./manage.py migrate to migrate these)
这怎么可能以及如何解决?
编辑:这是一个微弱的想法。难道是我在某些时候使用 ./manage.py syncdb 为这些应用程序创建新表,而我应该使用迁移?