tables.sql 1.36 KB
Newer Older
David Morley's avatar
David Morley committed
1 2 3
CREATE TABLE pods (
 id serial8 UNIQUE PRIMARY KEY,
 domain text UNIQUE NOT NULL,
4
 name text,
5
 softwarename text,
dmorley's avatar
dmorley committed
6 7
 masterversion text,
 shortversion text,
David Morley's avatar
David Morley committed
8
 score int DEFAULT 10,
dmorley's avatar
dmorley committed
9
 weightedscore numeric(5,2) DEFAULT 10,
10 11
 adminrating decimal DEFAULT 10,
 userrating decimal DEFAULT 10,
David Morley's avatar
David Morley committed
12
 whois text,
dmorley's avatar
dmorley committed
13
 hidden boolean DEFAULT 'yes',
14
 ip text,
15
 country text,
16 17 18 19
 city text,
 state text, 
 lat text,
 long text,
David Morley's avatar
David Morley committed
20
 email text,
dmorley's avatar
dmorley committed
21 22
 ipv6 boolean,
 secure boolean,
David Morley's avatar
David Morley committed
23 24 25 26 27
 sslvalid text,
 Hgitdate text,
 Hgitref text,
 Hruntime text,
 Hencoding text,
dmorley's avatar
dmorley committed
28
 statsurl text,
David Morley's avatar
David Morley committed
29
 monthsmonitored int,
dmorley's avatar
dmorley committed
30
 signup boolean,
31 32 33 34
 total_users int, 
 active_users_halfyear int,
 active_users_monthly int,
 local_posts int,
dmorley's avatar
dmorley committed
35 36
 uptime_alltime numeric(5,2),
 uptime_custom text,
David Morley's avatar
David Morley committed
37
 status text,
dmorley's avatar
dmorley committed
38
 responsetimems text,
39 40 41 42
 service_facebook boolean,
 service_twitter boolean,
 service_tumblr boolean,
 service_wordpress boolean,
dmorley's avatar
dmorley committed
43
 service_xmpp boolean,
dmorley's avatar
dmorley committed
44 45
 token text,
 tokenexpire timestamp,
dmorley's avatar
dmorley committed
46 47 48
 terms text,
 sslexpire timestamp,
 dnssec boolean,
49
 comment_counts int,
dmorley's avatar
dmorley committed
50
 weight int DEFAULT 50,
David Morley's avatar
David Morley committed
51 52 53
 dateUpdated timestamp DEFAULT current_timestamp,
 dateLaststats timestamp DEFAULT current_timestamp,
 dateCreated timestamp DEFAULT current_timestamp
David Morley's avatar
David Morley committed
54 55 56 57 58 59 60
);
CREATE TABLE rating_comments (
 id serial8 UNIQUE PRIMARY KEY,
 domain text NOT NULL,
 comment text,
 admin text, 
 pod_id int,
61 62
 rating int,
 username text,
David Morley's avatar
David Morley committed
63 64
 userurl text,
 date timestamp DEFAULT current_timestamp
65
);
dmorley's avatar
dmorley committed
66