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

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - 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 脚本