16.4.3 Update Script SQL Error (mshop_product_list_type)
Posted: 12 Jul 2016, 09:25
Running the extension managers update script i receive the following error. How can i fix that constraint issue?
Code: Select all
Migrate suppliercode in mshop_product
Executing statement "INSERT INTO "mshop_product_list" ("parentid", "siteid", "typeid", "domain", "refid", "config", "status", "ctime", "mtime", "editor")
SELECT p."id", p."siteid", (SELECT t."id" FROM "mshop_product_list_type" t WHERE t."siteid" = p."siteid" AND t."domain" = 'supplier' AND t."code" = 'default'), 'supplier', s."id", '[]', 1, NOW(), NOW(), 'setup:ProductMigrateSupplier'
FROM "mshop_supplier" s JOIN "mshop_product" p ON p."suppliercode" = s."code"" failed: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails ("INSTANCENAME"."mshop_product_list", CONSTRAINT "fk_msproli_typeid" FOREIGN KEY ("typeid") REFERENCES "mshop_product_list_type" ("id") ON DELETE CASCADE ON UPDATE CASCADE)