没有额外的选项可以“将迁移标记为新”,但有一个不同的、非常明显的解决方案:只需进行向后迁移。
$ ./manage.py migrate cmsplugin_mailchimp 0002 --fake
- Soft matched migration 0002 to 0002_thankyou_field.
Running migrations for cmsplugin_mailchimp:
- Migrating backwards to just after 0002_thankyou_field.
< cmsplugin_mailchimp:0003_redirect_url
(faked)
$ ./manage.py migrate cmsplugin_mailchimp --list
cmsplugin_mailchimp
(*) 0001_initial
(*) 0002_thankyou_field
( ) 0003_redirect_url
现在 South 的状态与数据库的状态相匹配,您实际上可以运行最后一次迁移:
$ ./manage.py migrate cmsplugin_mailchimp
Running migrations for cmsplugin_mailchimp:
- Migrating forwards to 0003_redirect_url.
> cmsplugin_mailchimp:0003_redirect_url
- Loading initial data for cmsplugin_mailchimp.
Installed 0 object(s) from 0 fixture(s)