From 120baaa58370780550b601cac34df2cd9f637fe0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Thu, 7 Apr 2011 21:31:34 +0200 Subject: [PATCH] Oops. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- upgrade/1.1.1/02_emails.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upgrade/1.1.1/02_emails.sql b/upgrade/1.1.1/02_emails.sql index 95ee45c..6903518 100644 --- a/upgrade/1.1.1/02_emails.sql +++ b/upgrade/1.1.1/02_emails.sql @@ -1,7 +1,8 @@ DELETE e2 FROM email_virtual AS e1 INNER JOIN email_virtual AS e2 - WHERE e1.email = e2.email AND e1.domain = e2.domain AND e1.redirect = REPLACE(e2.redirect, '@m4x.org', '@polytechnique.org'); + WHERE e1.email = e2.email AND e1.domain = e2.domain AND e1.redirect != e2.redirect + AND e1.redirect = REPLACE(e2.redirect, '@m4x.org', '@polytechnique.org'); UPDATE email_virtual SET redirect = REPLACE(redirect, '@m4x.org', '@polytechnique.org') WHERE redirect LIKE '%@m4x.org'; -- 2.1.4