擅长:python、mysql、java
<p>这就是我让事情运转的方式。</p>
<pre><code>pip install South
# add 'south', to INSTALL_APPS, then
python manage.py syncdb
# For existing project + database
python manage.py convert_to_south app_name
# Thereafter, call them per model changes
python manage.py schemamigration app_name --auto
python manage.py migrate app_name
</code></pre>
<p>参考文献:</p>
<p><a href="http://garmoncheg.blogspot.com/2011/08/django-how-and-why-to-use-migrations.html">http://garmoncheg.blogspot.com/2011/08/django-how-and-why-to-use-migrations.html</a>
<a href="http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/">http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/</a></p>