现在的位置: 首页 > 综合 > 正文

django south做数据库迁移

2012年08月20日 ⁄ 综合 ⁄ 共 235字 ⁄ 字号 评论关闭

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

抱歉!评论已关闭.