diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index ba477d13764..dbfac93b84b 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -452,3 +452,7 @@ ALTER TABLE llx_facture_fourn ADD COLUMN extraparams varchar(255) AFTER import_k ALTER TABLE llx_boxes ADD COLUMN maxline integer NULL; ALTER TABLE llx_product_fournisseur_price MODIFY fk_product_fournisseur integer DEFAULT 0; + +UPDATE llx_product SET canvas = NULL where canvas = 'default@product'; +UPDATE llx_product SET canvas = NULL where canvas = 'product@product'; +UPDATE llx_product SET canvas = NULL where canvas = 'service@product'; diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 815343e162e..99a91bab00a 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -42,6 +42,9 @@ delete from llx_product_extrafields where fk_object not in (select rowid from ll --delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe); +UPDATE llx_product SET canvas = NULL where canvas = 'default@product'; + + DELETE FROM llx_boxes where box_id NOT IN (SELECT rowid FROM llx_boxes_def); -- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid