drop table ttrss_tags;
+
drop table ttrss_user_entries;
drop table ttrss_entries;
+
drop table ttrss_feeds;
drop table ttrss_labels;
drop table ttrss_filters;
last_error text not null default '',
site_url varchar(250) not null default '');
+create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
+
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Footnotes', 'http://gnomedesktop.org/node/feed');
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Latest Linux Kernel Versions','http://kernel.org/kdist/rss.xml');
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'RPGDot Newsfeed',
content_hash varchar(250) not null,
no_orig_date boolean not null default false,
date_entered timestamp not null default NOW(),
- comments varchar(250) not null default '');
+ comments varchar(250) not null default '',
+ index (guid), index(title));
create table ttrss_user_entries (
ref_id integer not null references ttrss_entries(id) ON DELETE CASCADE,
last_read timestamp,
unread boolean not null default true);
+create index ttrss_user_entries_feed_id_index on ttrss_user_entries(feed_id);
+create index ttrss_user_entries_owner_uid_index on ttrss_user_entries(owner_uid);
+create index ttrss_user_entries_ref_id_index on ttrss_user_entries(ref_id);
+
drop table ttrss_filters;
drop table ttrss_filter_types;
sql_exp varchar(250) not null,
description varchar(250) not null);
+create index ttrss_labels_owner_uid_index on ttrss_labels(owner_uid);
+
insert into ttrss_labels (owner_uid,sql_exp,description) values (1,'unread = true',
'Unread articles');
owner_uid integer not null references ttrss_users(id) on delete cascade,
post_id integer references ttrss_entries(id) ON DELETE CASCADE not null);
+create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
+
drop table ttrss_version;
create table ttrss_version (schema_version int not null);
pref_name varchar(250) not null references ttrss_prefs(pref_name),
value text not null);
+create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);
+create index ttrss_user_prefs_value_index on ttrss_user_prefs(value);
+