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