]> git.wh0rd.org - tt-rss.git/blame_incremental - schema/ttrss_schema_mysql.sql
up/down arrows are hotkeys in feedlist
[tt-rss.git] / schema / ttrss_schema_mysql.sql
... / ...
CommitLineData
1drop table if exists ttrss_tags;
2drop table if exists ttrss_entries;
3drop table if exists ttrss_feeds;
4
5create 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 '',
9 update_interval integer not null default 0,
10 last_updated datetime default '',
11 last_error text not null default '',
12 site_url varchar(250) not null default '') TYPE=InnoDB;
13
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');
18insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml');
19
20insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss');
21
22insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions',
23 'http://kernel.org/kdist/rss.xml');
24
25insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed',
26 'http://www.rpgdot.com/team/rss/rss0.xml');
27
28insert into ttrss_feeds (title,feed_url) values ('Digg.com News',
29 'http://digg.com/rss/index.xml');
30
31insert into ttrss_feeds (title,feed_url) values ('Technocrat.net',
32 'http://syndication.technocrat.net/rss');
33
34create table ttrss_entries (id integer not null primary key auto_increment,
35 feed_id integer not null,
36 updated datetime not null,
37 title text not null,
38 guid varchar(255) not null unique,
39 link text not null,
40 content text not null,
41 content_hash varchar(250) not null,
42 last_read datetime,
43 marked bool not null default 0,
44 date_entered datetime not null,
45 no_orig_date bool not null default 0,
46 comments varchar(250) not null default '',
47 unread bool not null default 1,
48 index (feed_id),
49 foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB;
50
51drop table if exists ttrss_filters;
52drop table if exists ttrss_filter_types;
53
54create table ttrss_filter_types (id integer primary key,
55 name varchar(120) unique not null,
56 description varchar(250) not null unique) TYPE=InnoDB;
57
58
59insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
60insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
61insert into ttrss_filter_types (id,name,description) values (3, 'both',
62 'Title or Content');
63
64create table ttrss_filters (id integer primary key auto_increment,
65 filter_type integer not null references ttrss_filter_types(id),
66 reg_exp varchar(250) not null,
67 description varchar(250) not null default '') TYPE=InnoDB;
68
69drop table if exists ttrss_labels;
70
71create table ttrss_labels (id integer primary key auto_increment,
72 sql_exp varchar(250) not null,
73 description varchar(250) not null) TYPE=InnoDB;
74
75insert into ttrss_labels (sql_exp,description) values ('unread = true',
76 'Unread articles');
77
78insert into ttrss_labels (sql_exp,description) values (
79 'last_read is null and unread = false', 'Updated articles');
80
81create table ttrss_tags (id integer primary key auto_increment,
82 tag_name varchar(250) not null,
83 post_id integer not null,
84 index (post_id),
85 foreign key (post_id) references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB;
86
87drop table ttrss_version;
88
89create table ttrss_version (schema_version int not null) TYPE=InnoDB;
90
91insert into ttrss_version values (1);
92
93