django - loaddata error when converting db from sqlite3 to postgres
django, django-database, django-models, postgresql, postgresql-9.1
Solution
It is Django. I actually found the answer in an existing stackexchange post:
Switching Django project from sqlite3 backend to postgresql failes when loading datadump
I needed to TRUNCATE the database. Thank you for your help.
Problem
I am trying to convert from a sqlite3 db to Postgres (so that I can have timezone-aware datetime fields with django 1.4). I dumped the data from the sqlite3 db. Then switched settings to point to the empty postgres db. Then ran syncdb, then south migrations. All good so far. When I try to reload the dumped data into postgres, I get an error: An exception occurred while loading data: duplicate key value violates unique constraint "django_content_type_app_label_model_key" DETAIL: Key (app_label, model)=(django_twilio, caller) already exists. I removed twilio from the app and still got a similar error, just with the next object in the db. Any help is appreciated. I'm new to programming and django. Thanks!