Add flag inactive that is different from disabled. On the previous DB inactive corres...
authorJoão Pedro Athayde Marcondes de André (JP) <jp_git@m4x.org>
Tue, 11 Jan 2011 15:56:31 +0000 (16:56 +0100)
committerJoão Pedro Athayde Marcondes de André (JP) <jp_git@m4x.org>
Tue, 11 Jan 2011 15:56:31 +0000 (16:56 +0100)
upgrade/1.1.0/01_new_mail_schema.sql
upgrade/1.1.0/02_new_mail_insertion.sql

index 773f46b..6113714 100644 (file)
@@ -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),
index 7301870..6bb273a 100644 (file)
@@ -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)