From ef51683c045f6679011cbdf3bfd2e0c6dac443e2 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 6 Nov 2004 14:05:26 +0000 Subject: [PATCH] new notifs tables --- scripts/migration/0.9.2/notifs.sql | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/scripts/migration/0.9.2/notifs.sql b/scripts/migration/0.9.2/notifs.sql index db09356..9e36a24 100644 --- a/scripts/migration/0.9.2/notifs.sql +++ b/scripts/migration/0.9.2/notifs.sql @@ -1,15 +1,45 @@ -alter table auth_user_md5 add column watch set('contacts', 'deaths') default 'contacts' not null; alter table aliases add index (type); +alter table auth_user_quick add column watch_contacts tinyint(1) not null default 1; +alter table auth_user_quick add column watch_last timestamp not null; -create table watch ( - user_id smallint not null, - `type` enum('promo','non-inscrit') not null, - arg smallint not null, - primary key (user_id,type,arg) +create table watch_cat ( + id smallint not null auto_increment, + short varchar(40), + mail varchar(80), + frequent smallint(1) default 0, + primary key (id), + index (frequent) ); +insert into watch_cat VALUES(1,'Mise à jour de fiche', 'Ces camarades ont mis leur fiche à jour', 1); +insert into watch_cat VALUES(2,'Nouveaux inscrits', 'Ces camarades se sont inscrit', 0); +insert into watch_cat VALUES(3,'Décès', 'Ces camarades nous ont quitté', 0); + create table watch_ops ( - user_id smallint not null, - op enum('fiche','death','ins') not null, - primary key (user_id,op) + uid smallint not null, + cid smallint not null, + known timestamp not null, + date date not null, + info varchar(255), + primary key (uid,cid) +); + +create table watch_sub ( + uid smallint not null, + cid smallint not null, + primary key (uid,cid) +); + +create table watch_nonins ( + uid smallint not null, + ni_id smallint not null, + primary key (uid,ni_id) ); + +create table watch_promo ( + uid smallint not null, + promo smallint not null, + primary key (uid,promo) +); + + -- 2.1.4