This seems to be outdated as the reset
command does not seem to be found using the version of South I am using, which is the most recent I believe.
这似乎已经过时,因为使用我正在使用的南方版本似乎找不到重置命令,这是我认为的最新版本。
Anyways, say you are in production and things get really messy. What is the best current way to start fresh with a Django app as far as cleaning up the migration history?
无论如何,说你正在制作,事情变得非常混乱。在清理迁移历史记录的过程中,使用Django应用程序开始新鲜的最佳方式是什么?
1 个解决方案
#1
13
Steps:
脚步:
- Erase every
/migrations
folder inside your apps - 清除应用内的每个/迁移文件夹
- Go to the database and drop the south_migrationhistory table (or delete its rows)
- 转到数据库并删除south_migrationhistory表(或删除其行)
- (Optional) Remove south from your installed apps (if you want to get rid of south, if not, leave it alone)
- (可选)从已安装的应用程序中删除南方(如果您想要摆脱南方,如果没有,请不要管它)
Done
完成
Notice that you may drop the table or delete all its rows.
请注意,您可以删除表或删除其所有行。
If you drop it you'll have to syncdb
again.
如果你删除它,你将不得不再次syncdb。
Hope this helps!
希望这可以帮助!
#1
13
Steps:
脚步:
- Erase every
/migrations
folder inside your apps - 清除应用内的每个/迁移文件夹
- Go to the database and drop the south_migrationhistory table (or delete its rows)
- 转到数据库并删除south_migrationhistory表(或删除其行)
- (Optional) Remove south from your installed apps (if you want to get rid of south, if not, leave it alone)
- (可选)从已安装的应用程序中删除南方(如果您想要摆脱南方,如果没有,请不要管它)
Done
完成
Notice that you may drop the table or delete all its rows.
请注意,您可以删除表或删除其所有行。
If you drop it you'll have to syncdb
again.
如果你删除它,你将不得不再次syncdb。
Hope this helps!
希望这可以帮助!