惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - jjxstudio

关于silverlight 前景的讨论,不吐不快 没有说说新的async ctp吗? 新blog地址 青春咖啡馆 2010 计划 axapta 断开的记录集 django 1.1 理解zope3 的适配器 准备放弃django openerp新的web-client openerp view design elements中的col和colspan - jjxstudio a中的this和element 上下文 怎样才算是一个好的windows forms 应用程序框架? 自定义django admin 之一 django admin search_fields 今天的折腾 杭州:一个python的工作机会 ironpython的下一个版本
south
jjxstudio · 2009-07-24 · via 博客园 - jjxstudio

migration 这种东西一般适用在数据库已经初步定型,可能已经在试运行,有业务数据的情况下。否则,用migration可能会花费额外的时间

早先通常的流程是修改model定义,然后manage.py syncdb  . 在使用south后,流程就改为
①修改model
②创建migration 脚本,自动或手动创建
③用manage.py migrate app [xx]执行migration

1. 下载并安装
hg clone http://bitbucket.org/andrewgodwin/south/
hg update -C stableish
cd south
setup.py install

2. 转换存在项目

①将south加入到  settings.py INSTALLED_APPS中
②manage.py syncdb
安装south表 south_migrationhistory
③manage.py convert_to_south myapp

3。新项目
将south加入到  settings.py INSTALLED_APPS中

/manage.py schemamigration app --initial

/manage.py migrate myapp 

4. 表更新
自动

manage.py schemamigration myapp  --auto

manage.py migrate myapp 

5. 手动写migration 脚本