]>
Commit | Line | Data |
---|---|---|
eb36b4eb | 1 | drop table if exists ttrss_tags; |
648472a7 AD |
2 | drop table if exists ttrss_entries; |
3 | drop table if exists ttrss_feeds; | |
4 | ||
5 | create table ttrss_feeds (id integer not null auto_increment primary key, | |
6 | title varchar(200) not null unique, | |
7 | feed_url varchar(250) unique not null, | |
8 | icon_url varchar(250) not null default '', | |
d148926e | 9 | update_interval integer not null default 0, |
ab3d0b99 AD |
10 | last_updated datetime default '', |
11 | last_error text not null default '') TYPE=InnoDB; | |
648472a7 AD |
12 | |
13 | insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed'); | |
14 | insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml'); | |
15 | insert into ttrss_feeds (title,feed_url) values ('Planet Debian', 'http://planet.debian.org/rss20.xml'); | |
16 | insert into ttrss_feeds (title,feed_url) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml'); | |
17 | insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml'); | |
18 | ||
19 | insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss'); | |
20 | ||
21 | insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions', | |
22 | 'http://kernel.org/kdist/rss.xml'); | |
23 | ||
24 | insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed', | |
25 | 'http://www.rpgdot.com/team/rss/rss0.xml'); | |
26 | ||
27 | insert into ttrss_feeds (title,feed_url) values ('Digg.com News', | |
28 | 'http://digg.com/rss/index.xml'); | |
29 | ||
30 | insert into ttrss_feeds (title,feed_url) values ('Technocrat.net', | |
31 | 'http://syndication.technocrat.net/rss'); | |
32 | ||
33 | create table ttrss_entries (id integer not null primary key auto_increment, | |
1696229f | 34 | feed_id integer not null, |
8158c57a | 35 | updated datetime not null, |
9ad5b0de | 36 | title text not null, |
a0d5a39a | 37 | guid varchar(255) not null unique, |
49a0dd3d | 38 | link text not null, |
648472a7 AD |
39 | content text not null, |
40 | content_hash varchar(250) not null, | |
8158c57a AD |
41 | last_read datetime, |
42 | marked bool not null default 0, | |
43 | date_entered datetime not null, | |
44 | no_orig_date bool not null default 0, | |
648472a7 | 45 | comments varchar(250) not null default '', |
1696229f AD |
46 | unread bool not null default 1, |
47 | index (feed_id), | |
48 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB; | |
648472a7 AD |
49 | |
50 | drop table if exists ttrss_filters; | |
51 | drop table if exists ttrss_filter_types; | |
52 | ||
53 | create table ttrss_filter_types (id integer primary key, | |
54 | name varchar(120) unique not null, | |
4b3dff6e | 55 | description varchar(250) not null unique) TYPE=InnoDB; |
648472a7 | 56 | |
648472a7 AD |
57 | |
58 | insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title'); | |
59 | insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content'); | |
60 | insert into ttrss_filter_types (id,name,description) values (3, 'both', | |
61 | 'Title or Content'); | |
62 | ||
4b3dff6e | 63 | create table ttrss_filters (id integer primary key auto_increment, |
8158c57a | 64 | filter_type integer not null references ttrss_filter_types(id), |
4b3dff6e AD |
65 | reg_exp varchar(250) not null, |
66 | description varchar(250) not null default '') TYPE=InnoDB; | |
648472a7 | 67 | |
a82065a1 | 68 | drop table if exists ttrss_labels; |
48f0adb0 | 69 | |
a82065a1 | 70 | create table ttrss_labels (id integer primary key auto_increment, |
48f0adb0 | 71 | sql_exp varchar(250) not null, |
a82065a1 | 72 | description varchar(250) not null) TYPE=InnoDB; |
48f0adb0 | 73 | |
48f0adb0 AD |
74 | insert into ttrss_labels (sql_exp,description) values ('unread = true', |
75 | 'Unread articles'); | |
648472a7 | 76 | |
7cc6112a AD |
77 | insert into ttrss_labels (sql_exp,description) values ( |
78 | 'last_read is null and unread = false', 'Updated articles'); | |
79 | ||
eb36b4eb AD |
80 | create table ttrss_tags (id integer primary key auto_increment, |
81 | tag_name varchar(250) not null, | |
1696229f AD |
82 | post_id integer not null, |
83 | index (post_id), | |
84 | foreign key (post_id) references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB; | |
eb36b4eb | 85 |