Skip to content

Instantly share code, notes, and snippets.

@AsifulNobel
Created September 30, 2017 20:21
Show Gist options
  • Save AsifulNobel/189249c91391e1a5f4b1d0ddfad94f47 to your computer and use it in GitHub Desktop.
Save AsifulNobel/189249c91391e1a5f4b1d0ddfad94f47 to your computer and use it in GitHub Desktop.
Key Stuff Learnt While Using Django

Key Stuff Learnt While Using Django

Error: django.db.utils.IntegrityError: duplicate key value violates unique constraint tableName_ColumnName

Fix

This can happen sometimes when importing database from another machine using data dump. Execute python manage.py sqlsequencerest appName and copy-paste output sql commands directly in database. This will fix the index issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment