Django South - table already exists

前端 未结 8 587
名媛妹妹
名媛妹妹 2020-12-02 03:55

I am trying to get started with South. I had an existing database and I added South (syncdb, schemamigration --initial).

Then, I updated <

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 04:31

    Perform these steps in order may help you:

    1) python manage.py schemamigration apps.appname --initial

    Above step creates migration folder as default.

    2) python manage.py migrate apps.appname --fake

    generates a fake migration.

    3) python manage.py schemamigration apps.appname --auto

    Then you can add fields as you wish and perform the above command.

    4) python manage.py migrate apps.appname

提交回复
热议问题