Django

Solve integrity error duplicate key in Django PostgreSQL

25 Sep , 2015  

This error caused by we’re using database from copy / clone database. The sequences will be mixed-up.
To solved this, just follow this way :

1
2
python manage.py sqlsequencereset <app-name> > app.sql
psql -U username -d database -a -f < app.sql

Then your problem shall gone!


Leave a Reply

Your email address will not be published. Required fields are marked *