Jon Ballard
2007-04-04 02:28:48 UTC
Hello everybody, I'm new. Django is the bomb.. my app is coming
together quickly.
Now to my issue..
I dumped my database to json and tried to ingest it back in. Seemed
to work fine at first -- everything was there -- but it turns out no
new records can be added because the sequence field 'last_value' for
all the auto primary keys was left at 1, despite many records being
added to the respective tables. Now I tend to think this might
actually be an issue with Psycopg, but why would it manifest itself
only when using loaddata?
My setup:
Django 0.96
Ubuntu 6.10 (Edgy)
PostgreSQL 8.1.8-0ubuntu6.10
Psycopg 1.1.21-7
This is the error when trying to add a new record:
IntegrityError at /admin/spots/spot/add/
ERROR: duplicate key violates unique constraint "spots_spot_pkey"
INSERT INTO "spots_spot"
Anyone have any ideas? Am I doing something wrong perhaps? Thanks
for any help.
I'll continue to research of course..
-Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
together quickly.
Now to my issue..
I dumped my database to json and tried to ingest it back in. Seemed
to work fine at first -- everything was there -- but it turns out no
new records can be added because the sequence field 'last_value' for
all the auto primary keys was left at 1, despite many records being
added to the respective tables. Now I tend to think this might
actually be an issue with Psycopg, but why would it manifest itself
only when using loaddata?
My setup:
Django 0.96
Ubuntu 6.10 (Edgy)
PostgreSQL 8.1.8-0ubuntu6.10
Psycopg 1.1.21-7
This is the error when trying to add a new record:
IntegrityError at /admin/spots/spot/add/
ERROR: duplicate key violates unique constraint "spots_spot_pkey"
INSERT INTO "spots_spot"
Anyone have any ideas? Am I doing something wrong perhaps? Thanks
for any help.
I'll continue to research of course..
-Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---