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;