From 5e0f01c6592e8bc75b7f16de9e30e134eb367f93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Pedro=20Athayde=20Marcondes=20de=20Andr=C3=A9?= =?utf8?q?=20=28JP=29?= Date: Tue, 11 Jan 2011 16:56:31 +0100 Subject: [PATCH] Add flag inactive that is different from disabled. On the previous DB inactive corresponds to the '' option that is when the user has unmarked the redirection, while disabled is when the administrators have disabled the redirection/mail. --- upgrade/1.1.0/01_new_mail_schema.sql | 2 +- upgrade/1.1.0/02_new_mail_insertion.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade/1.1.0/01_new_mail_schema.sql b/upgrade/1.1.0/01_new_mail_schema.sql index 773f46b..6113714 100644 --- a/upgrade/1.1.0/01_new_mail_schema.sql +++ b/upgrade/1.1.0/01_new_mail_schema.sql @@ -46,7 +46,7 @@ CREATE TABLE email_redirect_account ( broken DATE NOT NULL DEFAULT '0000-00-00', broken_level TINYINT(1) NOT NULL DEFAULT 0, last DATE NOT NULL DEFAULT '0000-00-00', - flags ENUM('active','broken','disabled') NOT NULL, + flags ENUM('active','inactive','broken','disabled') NOT NULL, hash VARCHAR(32) DEFAULT NULL, allow_rewrite TINYINT(1) DEFAULT 0, KEY (uid), diff --git a/upgrade/1.1.0/02_new_mail_insertion.sql b/upgrade/1.1.0/02_new_mail_insertion.sql index 7301870..6bb273a 100644 --- a/upgrade/1.1.0/02_new_mail_insertion.sql +++ b/upgrade/1.1.0/02_new_mail_insertion.sql @@ -58,7 +58,7 @@ INSERT INTO homonyms_list (hrmid,uid) INSERT INTO email_redirect_account (uid,redirect,rewrite,type,action, broken,broken_level,last,flags,hash,allow_rewrite) SELECT a.uid,e.email,e.rewrite,'smtp',ef.email, - e.panne,e.panne_level,e.last,IF(e.flags='','disabled',IF(e.flags='disable','disabled',IF(e.flags='panne','broken',e.flags))),e.hash,e.allow_rewrite + e.panne,e.panne_level,e.last,IF(e.flags='','inactive',IF(e.flags='disable','disabled',IF(e.flags='panne','broken',e.flags))),e.hash,e.allow_rewrite FROM emails AS e LEFT JOIN emails AS ef ON (e.uid=ef.uid) LEFT JOIN accounts AS a ON (e.uid=a.uid) -- 2.1.4