Why don't my south migrations work?

后端 未结 6 1584
长情又很酷
长情又很酷 2020-12-04 04:48

First, I create my database.

create database mydb;

I add \"south\" to installed Apps. Then, I go to this tutorial: http://south.aeracode.

6条回答
  •  情歌与酒
    2020-12-04 05:16

    This is how I get things working.

    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
    

    References:

    http://garmoncheg.blogspot.com/2011/08/django-how-and-why-to-use-migrations.html http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/

提交回复
热议问题