]> git.wh0rd.org - tt-rss.git/blame_incremental - schema/ttrss_schema_mysql.sql
update TODO
[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 last_updated datetime default '') TYPE=InnoDB;
10
11insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
12insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
13insert into ttrss_feeds (title,feed_url) values ('Planet Debian', 'http://planet.debian.org/rss20.xml');
14insert into ttrss_feeds (title,feed_url) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml');
15insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml');
16
17insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss');
18
19insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions',
20 'http://kernel.org/kdist/rss.xml');
21
22insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed',
23 'http://www.rpgdot.com/team/rss/rss0.xml');
24
25insert into ttrss_feeds (title,feed_url) values ('Digg.com News',
26 'http://digg.com/rss/index.xml');
27
28insert into ttrss_feeds (title,feed_url) values ('Technocrat.net',
29 'http://syndication.technocrat.net/rss');
30
31create table ttrss_entries (id integer not null primary key auto_increment,
32 feed_id integer not null references ttrss_feeds(id) ON DELETE CASCADE,
33 updated datetime not null,
34 title text not null,
35 guid varchar(255) not null unique,
36 link text not null,
37 content text not null,
38 content_hash varchar(250) not null,
39 last_read datetime,
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) TYPE=InnoDB;
45
46drop table if exists ttrss_filters;
47drop table if exists ttrss_filter_types;
48
49create table ttrss_filter_types (id integer primary key,
50 name varchar(120) unique not null,
51 description varchar(250) not null unique) TYPE=InnoDB;
52
53
54insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
55insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
56insert into ttrss_filter_types (id,name,description) values (3, 'both',
57 'Title or Content');
58
59create table ttrss_filters (id integer primary key auto_increment,
60 filter_type integer not null references ttrss_filter_types(id),
61 reg_exp varchar(250) not null,
62 description varchar(250) not null default '') TYPE=InnoDB;
63
64drop table if exists ttrss_labels;
65
66create table ttrss_labels (id integer primary key auto_increment,
67 sql_exp varchar(250) not null,
68 description varchar(250) not null) TYPE=InnoDB;
69
70insert into ttrss_labels (sql_exp,description) values ('unread = true',
71 'Unread articles');
72
73create table ttrss_tags (id integer primary key auto_increment,
74 tag_name varchar(250) not null,
75 post_id integer references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB;
76