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