South如何从ForeignKey迁移到ManyToMany

时间:2014-10-09 20:28:59

标签: python django django-south

如何从ForeignKey迁移到ManyToMany?

原型

class Campaign(TimeStampedModel):
    featured_review = models.ForeignKey(
        'reviews.Review',
        blank=True,
        null=True,
        related_name='featured_on',
        default=None
    )

修改后的模型

class Campaign(TimeStampedModel):
    featured_review = models.ManyToManyField(
        'reviews.Review',
        blank=True,
        null=True,
        related_name='featured_on',
        default=None
    )

当我跑步时

./manage.py schemamigration companies --auto

我有“似乎没有任何改变。”

0 个答案:

没有答案