PK for product_related table

  • Posts: 3
  • Thank you received: 0
13 years 9 months ago #8605

The Primary Key for the jos_hikashop_product_related table needs to include product_related_type because this table is used for more than one type. With out the type being added to the PK the INSERT IGNORE will not add rows where the product_id and product_related_id are already in use for a different type.

Last edit: 13 years 9 months ago by ipv6wiz. Reason: Typos

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #8618

You're right. We'll add that query in next release to change the primary so that you can have other types in that table without conflicts:
ALTER TABLE `#__hikashop_product_related` DROP PRIMARY KEY ,
ADD PRIMARY KEY ( `product_id` , `product_related_id` , `product_related_type` )

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds
Powered by Kunena Forum