Dear All, I've copied a MySQL db (using mysqldump) and then loaded it into a new DB. I've also altered the structure slightly (I've added 6 columns).
However, the problem is that when I try and use the db to add more data, the primary key starts from 0 again. Since the number for the first current item is 1, the first item goes in ok, but the second gives me a key error. I've tried using the setting the table auto increment to a safe value using alter table_name AUTO_INCREMENT = 300 (there being 264 items in there already) but it doesn't work. I've also tried doing it with set last_increment_id = 300, and the db is happy, but django still counts from 0. Doing a direct insert in the DB (using mysql) works fine, and it auto_increments ok. It _seems_ as though Django is missing the fact that these keys already exist, which is why I get the clash. I'm using 0.96 (as I couldn't get the newer mysql module to compile). Any ideas? Thanks, Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---