close

[Solved] django.db.utils.Programming: relation already exists

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error django.db.utils.Programming: relation already exists in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How django.db.utils.Programming: relation already exists Error Occurs?

Today I get the following error django.db.utils.Programming: relation already exists in python.

How To Solve django.db.utils.Programming: relation already exists Error ?

  1. How To Solve django.db.utils.Programming: relation already exists Error ?

    To Solve django.db.utils.Programming: relation already exists Error 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.

  2. django.db.utils.Programming: relation already exists

    To Solve django.db.utils.Programming: relation already exists Error 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.

Solution 1

This works pretty fine

./manage.py migrate --fake default

Solution 2

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.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read