1. setting.py INSTALLED_APPS add south
2. python manage.py schemamigration mysite --initial
3. python manage.py convert_to_south mysite
4. change model.py
5. python manage.py schemamigration mysite --auto
6. python manage.py migrate mysite --delete-ghost-migrations
2. python manage.py schemamigration mysite --initial
3. python manage.py convert_to_south mysite
4. change model.py
5. python manage.py schemamigration mysite --auto
6. python manage.py migrate mysite --delete-ghost-migrations
本文详细介绍了如何通过六个步骤在Django项目中使用South插件完成数据库迁移:配置安装South、初始化迁移、转换已有模型、自动创建迁移文件及清理幽灵迁移记录。
1802

被折叠的 条评论
为什么被折叠?



