From 3edc470f73054c2d9ae099e67fe2e71afbb7655a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Jun 2010 15:53:57 +0000 Subject: [PATCH] Fix: Error in creation foreign key --- htdocs/install/mysql/migration/2.8.0-2.9.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql index 528e5c201dd..2bd1fb560ac 100755 --- a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql +++ b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql @@ -21,6 +21,7 @@ ALTER TABLE llx_bookmark ADD COLUMN position integer DEFAULT 0; -- rename llx_product_det ALTER TABLE llx_product_det RENAME TO llx_product_lang; ALTER TABLE llx_product_lang ADD UNIQUE INDEX uk_product_lang (fk_product, lang); +-- V4.1 DELETE FROM llx_product_lang WHERE fk_product NOT IN (SELECT rowid from llx_product); ALTER TABLE llx_product_lang ADD CONSTRAINT fk_product_lang_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); ALTER TABLE llx_product ADD COLUMN virtual tinyint DEFAULT 0 NOT NULL AFTER tms;