]>
git.wh0rd.org - tt-rss.git/blob - schema/ttrss_schema_mysql.sql
1 drop table if exists ttrss_tags
;
2 drop table if exists ttrss_entries
;
3 drop table if exists ttrss_feeds
;
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 '',
9 last_updated datetime
default '') TYPE=InnoDB
;
11 insert into ttrss_feeds (title
,feed_url
) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
12 insert into ttrss_feeds (title
,feed_url
) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
13 insert into ttrss_feeds (title
,feed_url
) values ('Planet Debian', 'http://planet.debian.org/rss20.xml');
14 insert into ttrss_feeds (title
,feed_url
) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml');
15 insert into ttrss_feeds (title
,feed_url
) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml');
17 insert into ttrss_feeds (title
,feed_url
) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss');
19 insert into ttrss_feeds (title
,feed_url
) values ('Latest Linux Kernel Versions',
20 'http://kernel.org/kdist/rss.xml');
22 insert into ttrss_feeds (title
,feed_url
) values ('RPGDot Newsfeed',
23 'http://www.rpgdot.com/team/rss/rss0.xml');
25 insert into ttrss_feeds (title
,feed_url
) values ('Digg.com News',
26 'http://digg.com/rss/index.xml');
28 insert into ttrss_feeds (title
,feed_url
) values ('Technocrat.net',
29 'http://syndication.technocrat.net/rss');
31 create table ttrss_entries (id integer not null primary key auto_increment
,
32 feed_id
integer not null,
33 updated datetime
not null,
35 guid
varchar(255) not null unique,
37 content text not null,
38 content_hash
varchar(250) not null,
40 marked bool
not null default 0,
41 date_entered datetime
not null,
42 no_orig_date bool
not null default 0,
43 comments varchar(250) not null default '',
44 unread bool
not null default 1,
46 foreign key (feed_id
) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB
;
48 drop table if exists ttrss_filters
;
49 drop table if exists ttrss_filter_types
;
51 create table ttrss_filter_types (id integer primary key,
52 name varchar(120) unique not null,
53 description
varchar(250) not null unique) TYPE=InnoDB
;
56 insert into ttrss_filter_types (id,name,description
) values (1, 'title', 'Title');
57 insert into ttrss_filter_types (id,name,description
) values (2, 'content', 'Content');
58 insert into ttrss_filter_types (id,name,description
) values (3, 'both',
61 create table ttrss_filters (id integer primary key auto_increment
,
62 filter_type
integer not null references ttrss_filter_types(id),
63 reg_exp
varchar(250) not null,
64 description
varchar(250) not null default '') TYPE=InnoDB
;
66 drop table if exists ttrss_labels
;
68 create table ttrss_labels (id integer primary key auto_increment
,
69 sql_exp
varchar(250) not null,
70 description
varchar(250) not null) TYPE=InnoDB
;
72 insert into ttrss_labels (sql_exp
,description
) values ('unread = true',
75 create table ttrss_tags (id integer primary key auto_increment
,
76 tag_name
varchar(250) not null,
77 post_id
integer not null,
79 foreign key (post_id
) references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB
;