Jump to content
thirty bees forum
  • 0

database importing product_attribute table - problems with product_default key



Hello, as my shop is far slower than a toaster I've decided to install it from scratch.

I'm importing tables at the moment and I've got problems with tb_product_attribute. I am getting the following error:

INSERT INTO `tb_product_attribute` VALUES ('76', '451', '67250', '', '0', '5905001672506', '', '0.000000', '114.950000', '0.000000', '0', '0.000000', '0.000000', '0', '1', '0000-00-00');




MySQL zwrócił komunikat: Dokumentacja

#1062 - Duplicate entry '451-0' for key 'product_default'



There are 5 attributes for this id_product and only one of them is set to 1 in the default_on field.

MySQL imports only two of them. 😞



Is everything all right with the table configuration?



Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

It looks like you are crossing the PS 1.6.0-1.6.1 barrier. In 1.6.0 the default has value 1 and the other value 0. In 1.6.1 (and TB) the NULL value is used instead of 0. That enables the system to make the field a unique key - what makes it imposible to have more than one default. 

NULLs are excepted from this unique requirement. However, zeroes do trigger duplicate key errors. You are likely to experience similar problems with pictures.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...