Fix: corrupted extra tables.

This commit is contained in:
Laurent Destailleur 2012-05-07 20:44:20 +02:00
parent 0737748e48
commit 774bf30e4c

View File

@ -36,9 +36,15 @@ update llx_projet_task set fk_projet = null where fk_projet not in (select rowid
update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
delete from llx_societe_extrafields where fk_object not in (select rowid from llx_societe);
delete from llx_adherent_extrafields where fk_object not in (select rowid from llx_adherent);
delete from llx_product_extrafields where fk_object not in (select rowid from llx_product);
--delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe);
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
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note)