使用新的“--freeze”的正确方法是什么? django-south 的 startmigration 选项?
我已经尝试过以下操作,但这似乎只创建一个空的迁移文件:
startmigration appname freeze_appname --freeze appname
我也尝试过:
startmigration --freeze appname
也不起作用。
I've tried the following but this seems to only create an empty migration file:
startmigration appname freeze_appname --freeze appname
i've also tried just:
startmigration --freeze appname
doesn't work either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,因为我周围没有南方用户,所以我必须弄清楚如何做到这一点。
我做错的是首先创建数据迁移而不冻结
我这样做的应用程序:
这创建了空白迁移文件,然后我在其中放入了数据迁移函数。 但我没有冻结我想在迁移过程中使用/访问的应用程序,
正确的方法是:
Ok since i see no SOUTH users around, i had to figure out how to do this.
what i did wrong was create the data migrations first without freezing the apps
i did this:
and this created the blank migrations file where i then put in my data migration functions. but i did not freeze the apps i wanted to use/access withing the migration
the right way to do this would have been: