1 alter table aliases
add index (type);
2 alter table auth_user_quick
add column watch_flags
set('contacts','mail') not null default 'contacts';
3 alter table auth_user_quick
add column watch_last
timestamp not null;
4 alter table auth_user_quick
add index(watch_flags
);
6 create table watch_cat (
7 id smallint not null auto_increment
,
10 frequent
smallint(1) default 0,
15 insert into watch_cat
VALUES(1,'Mise à jour de fiche', 'Ces camarades ont mis leur fiche à jour', 1);
16 insert into watch_cat
VALUES(2,'Nouveaux inscrits', 'Ces camarades se sont inscrit', 0);
17 insert into watch_cat
VALUES(3,'Décès', 'Ces camarades nous ont quitté', 0);
19 create table watch_ops (
20 uid
smallint not null,
21 cid
smallint not null,
22 known
timestamp not null,
25 primary key (uid
,cid
),
29 create table watch_sub (
30 uid
smallint not null,
31 cid
smallint not null,
35 create table watch_nonins (
36 uid
smallint not null,
37 ni_id
smallint not null,
38 primary key (uid
,ni_id
)
41 create table watch_promo (
42 uid
smallint not null,
43 promo
smallint not null,
44 primary key (uid
,promo
)
47 replace into watch_sub
49 from auth_user_md5
AS u
51 where u.perms
!= 'non-inscrit';