14266
|
1 -- Contact Availability Prediction plugin for Gaim
|
|
2 --
|
|
3 -- Copyright (C) 2006 Geoffrey Foster.
|
|
4 --
|
|
5 -- This program is free software; you can redistribute it and/or
|
|
6 -- modify it under the terms of the GNU General Public License as
|
|
7 -- published by the Free Software Foundation; either version 2 of the
|
|
8 -- License, or (at your option) any later version.
|
|
9 --
|
|
10 -- This program is distributed in the hope that it will be useful, but
|
|
11 -- WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13 -- General Public License for more details.
|
|
14 --
|
|
15 -- You should have received a copy of the GNU General Public License
|
|
16 -- along with this program; if not, write to the Free Software
|
|
17 -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
18 -- 02111-1307, USA.
|
|
19
|
|
20 drop table if exists cap_status;
|
|
21 drop table if exists cap_message;
|
|
22 drop table if exists cap_msg_count;
|
|
23 drop table if exists cap_status_count;
|
|
24 drop table if exists cap_my_usage;
|
|
25
|
|
26 create table if not exists cap_status (
|
|
27 buddy varchar(60) not null,
|
|
28 account varchar(60) not null,
|
|
29 protocol varchar(60) not null,
|
|
30 status varchar(60) not null,
|
|
31 event_time datetime not null,
|
|
32 primary key (buddy, account, protocol, event_time)
|
|
33 );
|
|
34
|
|
35 create table if not exists cap_message (
|
|
36 sender varchar(60) not null,
|
|
37 receiver varchar(60) not null,
|
|
38 account varchar(60) not null,
|
|
39 protocol varchar(60) not null,
|
|
40 word_count integer not null,
|
|
41 event_time datetime not null,
|
|
42 primary key (sender, account, protocol, receiver, event_time)
|
|
43 );
|
|
44
|
|
45 create table if not exists cap_msg_count (
|
|
46 buddy varchar(60) not null,
|
|
47 account varchar(60) not null,
|
|
48 protocol varchar(60) not null,
|
|
49 minute_val int not null,
|
|
50 success_count int not null,
|
|
51 failed_count int not null,
|
|
52 primary key (buddy, account, protocol, minute_val)
|
|
53 );
|
|
54
|
|
55 create table if not exists cap_status_count (
|
|
56 buddy varchar(60) not null,
|
|
57 account varchar(60) not null,
|
|
58 protocol varchar(60) not null,
|
|
59 status varchar(60) not null,
|
|
60 success_count int not null,
|
|
61 failed_count int not null,
|
|
62 primary key (buddy, account, protocol, status)
|
|
63 );
|
|
64
|
|
65 create table if not exists cap_my_usage (
|
|
66 account varchar(60) not null,
|
|
67 protocol varchar(60) not null,
|
|
68 online tinyint not null,
|
|
69 event_time datetime not null,
|
|
70 primary key(account, protocol, online, event_time)
|
|
71 );
|