Skip to content
Snippets Groups Projects
Commit 96e05869 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: enhance cleaning of database

parent ddb31d4b
Branches
Tags
No related merge requests found
...@@ -30,7 +30,11 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid ...@@ -30,7 +30,11 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid
update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet);
update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet);
update llx_propal set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
update llx_propal set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user);
update llx_propal set fk_user_cloture = null where fk_user_cloture not in (select rowid from llx_user);
update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user); update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
update llx_commande set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user);
ALTER TABLE llx_extrafields ADD COLUMN TYPE VARCHAR(8); ALTER TABLE llx_extrafields ADD COLUMN TYPE VARCHAR(8);
......
...@@ -34,7 +34,11 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid ...@@ -34,7 +34,11 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid
update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet);
update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet);
update llx_propal set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
update llx_propal set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user);
update llx_propal set fk_user_cloture = null where fk_user_cloture not in (select rowid from llx_user);
update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user); update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
update llx_commande set fk_user_valid = null where fk_user_valid 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_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_adherent_extrafields where fk_object not in (select rowid from llx_adherent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment