pel_ft Posted September 6, 2008 Posted September 6, 2008 Hi, I'm in the process of upgrading a site, which includes using a newer version of OS commerce. I followed the upgrade instructions and created a new install, then copied the database and custom files to this new site. However when I imported the new database I started to get the error "#1062 - Duplicate entry '0' for key 1 " when making some changes. I finally realized that this was because the auto_increment setting was missing from the primary indexes of all the tables. When I manually added these back in everything seems to work. What I would like to know is, did I do something wrong with the myphpadmin export and import which meant the auto_increment settings were not recreated or is this normal behavior? How should I use export and import using myphpadmin so that these settings are kept? Cheers Paul.
♥FWR Media Posted September 6, 2008 Posted September 6, 2008 Hi, I'm in the process of upgrading a site, which includes using a newer version of OS commerce. I followed the upgrade instructions and created a new install, then copied the database and custom files to this new site. However when I imported the new database I started to get the error "#1062 - Duplicate entry '0' for key 1 " when making some changes. I finally realized that this was because the auto_increment setting was missing from the primary indexes of all the tables. When I manually added these back in everything seems to work. What I would like to know is, did I do something wrong with the myphpadmin export and import which meant the auto_increment settings were not recreated or is this normal behavior? How should I use export and import using myphpadmin so that these settings are kept? Cheers Paul. Structure Add DROP TABLE / DROP VIEW Add IF NOT EXISTS Add AUTO_INCREMENT value Enclose table and field names with backquotes Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
pel_ft Posted September 6, 2008 Author Posted September 6, 2008 StructureAdd DROP TABLE / DROP VIEW Add IF NOT EXISTS Add AUTO_INCREMENT value Enclose table and field names with backquotes Thanks Robert. I did have this selected. I have just retried this and the problem was because I had changed the compatibility mode to mysql which drops the auto_increment values even if they are selected.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.