]> git.wh0rd.org - tt-rss.git/blame - schema/ttrss_schema_pgsql.sql
up/down arrows are hotkeys in feedlist
[tt-rss.git] / schema / ttrss_schema_pgsql.sql
CommitLineData
eb36b4eb 1drop table ttrss_tags;
28a80fbf
AD
2drop table ttrss_entries;
3drop table ttrss_feeds;
4
5create table ttrss_feeds (id serial not null primary key,
6 title varchar(200) not null unique,
7 feed_url varchar(250) unique not null,
b7f4bda2 8 icon_url varchar(250) not null default '',
d148926e 9 update_interval integer not null default 0,
ab3d0b99 10 last_updated timestamp default null,
37d379de
AD
11 last_error text not null default '',
12 site_url varchar(250) not null default '');
28a80fbf 13
a2015351
AD
14insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
15insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
16insert into ttrss_feeds (title,feed_url) values ('Planet Debian', 'http://planet.debian.org/rss20.xml');
17insert into ttrss_feeds (title,feed_url) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml');
466001c4
AD
18insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml');
19
a2015351 20insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss');
857d6a80 21
a2015351 22insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions',
857d6a80
AD
23 'http://kernel.org/kdist/rss.xml');
24
a2015351 25insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed',
857d6a80
AD
26 'http://www.rpgdot.com/team/rss/rss0.xml');
27
a2015351 28insert into ttrss_feeds (title,feed_url) values ('Digg.com News',
857d6a80
AD
29 'http://digg.com/rss/index.xml');
30
19fc76c0 31insert into ttrss_feeds (title,feed_url) values ('Technocrat.net',
857d6a80 32 'http://syndication.technocrat.net/rss');
28a80fbf 33
28a80fbf 34create table ttrss_entries (id serial not null primary key,
eb36b4eb 35 feed_id int references ttrss_feeds(id) ON DELETE CASCADE not null,
d76a3b03 36 updated timestamp not null,
9ad5b0de 37 title text not null,
49a0dd3d
AD
38 guid text not null unique,
39 link text not null,
d76a3b03 40 content text not null,
466001c4 41 content_hash varchar(250) not null,
b197f117 42 last_read timestamp,
9a4506c8 43 marked boolean not null default false,
c3a8d71a 44 date_entered timestamp not null default NOW(),
b82af8c3 45 no_orig_date boolean not null default false,
a1ea1e12 46 comments varchar(250) not null default '',
b82af8c3 47 unread boolean not null default true);
a0d53889
AD
48
49drop table ttrss_filters;
50drop table ttrss_filter_types;
51
52create table ttrss_filter_types (id integer primary key,
53 name varchar(120) unique not null,
54 description varchar(250) not null unique);
55
56insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
57insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
58insert into ttrss_filter_types (id,name,description) values (3, 'both',
bdc00fe0 59 'Title or Content');
a0d53889
AD
60
61create table ttrss_filters (id serial primary key,
62 filter_type integer not null references ttrss_filter_types(id),
4b3dff6e 63 reg_exp varchar(250) not null,
a0d53889
AD
64 description varchar(250) not null default '');
65
48f0adb0
AD
66drop table ttrss_labels;
67
68create table ttrss_labels (id serial primary key,
69 sql_exp varchar(250) not null,
70 description varchar(250) not null);
71
48f0adb0
AD
72insert into ttrss_labels (sql_exp,description) values ('unread = true',
73 'Unread articles');
74
7cc6112a
AD
75insert into ttrss_labels (sql_exp,description) values (
76 'last_read is null and unread = false', 'Updated articles');
77
eb36b4eb
AD
78create table ttrss_tags (id serial primary key,
79 tag_name varchar(250) not null,
80 post_id integer references ttrss_entries(id) ON DELETE CASCADE not null);
81
5f171894
AD
82drop table ttrss_version;
83
84create table ttrss_version (schema_version int not null);
85
86insert into ttrss_version values (1);
87