From: x2000habouzit Date: Sun, 5 Sep 2004 17:44:38 +0000 (+0000) Subject: email transition X-Git-Tag: xorg/old~1574 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b7ecdc06d448f58c225622c10c4c1ded3551b664;p=platal.git email transition --- diff --git a/scripts/emails.sql b/scripts/emails.sql new file mode 100644 index 0000000..a07b8f5 --- /dev/null +++ b/scripts/emails.sql @@ -0,0 +1,14 @@ +-------------------------------------------------------------------------------- +-- emails +-------------------------------------------------------------------------------- +update x4dat.emails set flags=CONCAT_WS(',',flags,'active') where find_in_set('filtre',flags); +alter table x4dat.emails add column rewrite CHAR(128) NOT NULL after email; +update x4dat.emails as e inner join x4dat.aliases as a ON(a.id=e.uid AND a.type='a_vie') set e.rewrite=CONCAT(a.alias,'@m4x.org') where find_in_set('m4x',flags); +update x4dat.emails as e inner join x4dat.aliases as a ON(a.id=e.uid AND a.type='a_vie') set e.rewrite=CONCAT(a.alias,'@polytechnique.org') where find_in_set('rewrite',flags) AND rewrite=''; +alter table x4dat.emails change flags flags set('active','filter','mtic'); +update x4dat.emails set flags='filter' WHERE num=0; +alter table x4dat.emails drop primary key; +alter table x4dat.emails add index uid (uid); +alter table x4dat.emails add primary key (uid,email); +alter table x4dat.emails drop column num; +