From: João Pedro Athayde Marcondes de André (JP) Date: Tue, 11 Jan 2011 15:56:31 +0000 (+0100) Subject: Add flag inactive that is different from disabled. On the previous DB inactive corres... X-Git-Tag: xorg/1.1.0~194 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5e0f01c6592e8bc75b7f16de9e30e134eb367f93;p=platal.git 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. --- 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)