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