Adds scripts to update geoloc_pays and to import AX nationalities.
[platal.git] / upgrade / 0.9.2 / notifs.sql
CommitLineData
0337d704 1alter table aliases add index (type);
2alter table auth_user_quick add column watch_flags set('contacts','mail') not null default 'contacts';
3alter table auth_user_quick add column watch_last timestamp not null;
4alter table auth_user_quick add index(watch_flags);
5
6create table watch_cat (
7 id smallint not null auto_increment,
8 short varchar(40),
9 mail varchar(80),
10 frequent smallint(1) default 0,
11 primary key (id),
12 index (frequent)
13);
14
15insert into watch_cat VALUES(1,'Mise à jour de fiche', 'Ces camarades ont mis leur fiche à jour', 1);
16insert into watch_cat VALUES(2,'Nouveaux inscrits', 'Ces camarades se sont inscrit', 0);
17insert into watch_cat VALUES(3,'Décès', 'Ces camarades nous ont quitté', 0);
18
19create table watch_ops (
20 uid smallint not null,
21 cid smallint not null,
22 known timestamp not null,
23 date date not null,
24 info varchar(255),
25 primary key (uid,cid),
26 index (known)
27);
28
29create table watch_sub (
30 uid smallint not null,
31 cid smallint not null,
32 primary key (uid,cid)
33);
34
35create table watch_nonins (
36 uid smallint not null,
37 ni_id smallint not null,
38 primary key (uid,ni_id)
39);
40
41create table watch_promo (
42 uid smallint not null,
43 promo smallint not null,
44 primary key (uid,promo)
45);
46
47replace into watch_sub
48 select u.user_id,id
49 from auth_user_md5 AS u
50 join watch_cat
51 where u.perms != 'non-inscrit';
52
53