South migrate error - relation already exists

后端 未结 3 676
别跟我提以往
别跟我提以往 2021-01-11 12:04

Background: After adding djangoratings to my project, I tried running

django-admin.py schemamigration djangoratings --initial 
--settings=myapp.settings.loc         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-11 12:47

    This is in an extension of @stef_huayue's answer if it does not quite work as expected.

    Find out which migration failed. The coressponding migration_file.py will usually be where the migrations.AddField operation is happening. Then run: python manage.py migrate app_name --fake [migration_file]

    without the file extension. Followed by:

    python manage.py migrate app_name

提交回复
热议问题