Ran into a bit of a problem, i\'m getting the above error message when i run \'python manage.py syncdb\' I\'m working on a fairly old site. It\' running django
python manage.py syncdb
From the inspiration of Wolph, here is my fix.
SELECT setval('django_migrations_id_seq', (SELECT MAX(id) FROM django_migrations));