From 118f418074c48865b128fef07bb4e01239583419 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Thu, 4 Jun 2009 21:14:59 +0000
Subject: [PATCH] Clean bad records

---
 mysql/migration/2.6.0-2.7.0.sql | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mysql/migration/2.6.0-2.7.0.sql b/mysql/migration/2.6.0-2.7.0.sql
index 6a3aad5613b..dd306c7aa74 100644
--- a/mysql/migration/2.6.0-2.7.0.sql
+++ b/mysql/migration/2.6.0-2.7.0.sql
@@ -35,6 +35,11 @@ delete from llx_const where name = 'SYSLOG_LEVEL' and entity = 2;
 alter table llx_societe add column import_key varchar(14);
 
  
+-- V4.1 delete from llx_paiementfourn where rowid not in (select fk_paiementfourn from llx_paiementfourn_facturefourn);
+-- V4.1 delete from llx_paiementfourn_facturefourn where fk_facturefourn not in (select rowid from llx_facture_fourn);
+
+
+ 
 -- Multi company
 ALTER TABLE llx_rights_def ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER module;
 ALTER TABLE llx_events ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER type;
-- 
GitLab