Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

auto_increment setting with database import


pel_ft

Recommended Posts

Posted

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.

Posted
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

Posted
Structure

Add 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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...