【发布时间】:2015-02-13 04:34:06
【问题描述】:
我将字段名称从 theaters 更改为 showtimes
#from
theaters = models.ManyToManyField(Movie,null=True,blank=True,through="Showtime")
#to
showtimes = models.ManyToManyField(Movie,null=True,blank=True,through="Showtime")
但是当我使用南迁移它时,什么也没有发生:
$./manage.py schemamigration movie --auto
Nothing seems to have changed.
$./manage.py migrate movie
Running migrations for movie:
- Nothing to migrate.
- Loading initial data for movie.
Installed 0 object(s) from 0 fixture(s)
我觉得很奇怪,有人可以教我迁移它的正确方法吗?
【问题讨论】:
-
我无法备份,但我认为
through参数用于命名表(如果给定)。您是否尝试过您当前的代码? -
我试试我的代码。效果很好。看来更改的字段并没有影响当前代码
标签: python django django-south