django.db.utils.ProgrammingError: relation already exists

前端 未结 12 826
一向
一向 2020-12-23 14:11

I\'m trying to set up the tables for a new django project (that is, the tables do NOT already exist in the database); the django version is 1.7 and the db back end is Postgr

12条回答
  •  半阙折子戏
    2020-12-23 15:06

    I was facing the similar issues, where i had changed column name. I was getting same error as mentioned in the stack-trace provided with he question.

    Here's what I did.

    I ran fake migrations first. Then i removed it's(migrations i wanted to run) entry from django_migrations table and ran migrations again(no fake this time).

    Changes appeared as expected for me.

    hope this is helpful.

提交回复
热议问题