Hi all,
It looks like this problem has been fixed in the past but I have been
having it crop up recently.
Here is what I did:
1. created an app
2. manually entered some data
3. took a fixture dump of the app
4. dropped and created a new database
5. restored the fixture dump
6. Whenever I tried to add a new item in the admin menu I got a
"duplicate key violates unique constraint" error.
7. For each table which had the problem I had to run "SELECT
SETVAL('sequence-table-name', (SELECT max(id) FROM table-name)+1);
8. Once it was run I could add stuff again.
I tried this with JSON and XML back up files using Ubuntu 7.10, Django
0.96 from the Ubuntu repository.
Searching on this group I found a reference to a manage.py
sequencereset (or something close) but also in the same post the
person noted that it should run automatically.
Is this a bug or am I doing something wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---