不小心删除了我的django南迁移目录

编程入门 行业动态 更新时间:2024-10-17 10:29:36
本文介绍了不小心删除了我的django南迁移目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不小心删除了其中一个Django应用程式的South migrations目录。这个目录不在git下。

I accidentally deleted the South migrations directory for one of my Django apps. This directory was not under git.

现在在数据库中有磁盘上不存在的迁移。

So now there are migrations in the database that are not present on the disk.

推荐答案

没有任何类型的备份或找到文件的地方,什么地方你将要做的是进行初始迁移,然后伪造它们。

Without the option of any type of backup or finding the files somewhere, what you're going to have to do is make initial migrations and then fake them.

$ ./manage.py schemamigration app --initial $ ./manage.py migrate app --fake

到您目前的位置,但是您不能选择向后迁移。

This will get you to where you are currently, however you won't have the option to migrate backwards.

更多推荐

不小心删除了我的django南迁移目录

本文发布于:2023-11-01 01:52:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547901.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:小心   目录   django

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!