]> git.wh0rd.org - tt-rss.git/blame - ttrss_schema_mysql.sql
initial mysql schema, db abstraction layer
[tt-rss.git] / ttrss_schema_mysql.sql
CommitLineData
648472a7
AD
1drop table if exists ttrss_entries;
2drop table if exists ttrss_feeds;
3
4create table ttrss_feeds (id integer not null auto_increment primary key,
5 title varchar(200) not null unique,
6 feed_url varchar(250) unique not null,
7 icon_url varchar(250) not null default '',
8 last_updated timestamp default null);
9
10alter table ttrss_feeds ENGINE=InnoDB;
11
12insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
13insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
14insert into ttrss_feeds (title,feed_url) values ('Planet Debian', 'http://planet.debian.org/rss20.xml');
15insert into ttrss_feeds (title,feed_url) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml');
16insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml');
17
18insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss');
19
20insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions',
21 'http://kernel.org/kdist/rss.xml');
22
23insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed',
24 'http://www.rpgdot.com/team/rss/rss0.xml');
25
26insert into ttrss_feeds (title,feed_url) values ('Digg.com News',
27 'http://digg.com/rss/index.xml');
28
29insert into ttrss_feeds (title,feed_url) values ('Technocrat.net',
30 'http://syndication.technocrat.net/rss');
31
32create table ttrss_entries (id integer not null primary key auto_increment,
33 feed_id int id not null,
34 updated timestamp not null,
35 title varchar(250) not null,
36 guid varchar(250) not null unique,
37 link varchar(250) not null,
38 content text not null,
39 content_hash varchar(250) not null,
40 last_read timestamp,
41 marked boolean not null default 'false',
42 date_entered timestamp not null,
43 no_orig_date boolean not null default 'false',
44 comments varchar(250) not null default '',
45 unread boolean not null default true);
46
47alter table ttrss_entries ENGINE=InnoDB;
48
49drop table if exists ttrss_filters;
50drop table if exists ttrss_filter_types;
51
52create table ttrss_filter_types (id integer primary key,
53 name varchar(120) unique not null,
54 description varchar(250) not null unique);
55
56alter table ttrss_filter_types ENGINE=InnoDB;
57
58insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
59insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
60insert into ttrss_filter_types (id,name,description) values (3, 'both',
61 'Title or Content');
62
63create table ttrss_filters (id serial primary key,
64 filter_type integer not null,
65 regexp varchar(250) not null,
66 description varchar(250) not null default '');
67
68alter table ttrss_filters ENGINE=InnoDB;
69