]>
Commit | Line | Data |
---|---|---|
eb36b4eb | 1 | drop table if exists ttrss_tags; |
648472a7 AD |
2 | drop table if exists ttrss_entries; |
3 | drop table if exists ttrss_feeds; | |
4 | ||
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 '', | |
d148926e | 9 | update_interval integer not null default 0, |
1089b16b | 10 | purge_interval integer not null default 0, |
ab3d0b99 | 11 | last_updated datetime default '', |
37d379de AD |
12 | last_error text not null default '', |
13 | site_url varchar(250) not null default '') TYPE=InnoDB; | |
648472a7 AD |
14 | |
15 | insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed'); | |
16 | insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml'); | |
17 | insert into ttrss_feeds (title,feed_url) values ('Planet Debian', 'http://planet.debian.org/rss20.xml'); | |
18 | insert into ttrss_feeds (title,feed_url) values ('Planet GNOME', 'http://planet.gnome.org/rss20.xml'); | |
19 | insert into ttrss_feeds (title,feed_url) values ('Planet Ubuntu', 'http://planet.ubuntulinux.org/rss20.xml'); | |
20 | ||
21 | insert into ttrss_feeds (title,feed_url) values ('Monologue', 'http://www.go-mono.com/monologue/index.rss'); | |
22 | ||
23 | insert into ttrss_feeds (title,feed_url) values ('Latest Linux Kernel Versions', | |
24 | 'http://kernel.org/kdist/rss.xml'); | |
25 | ||
26 | insert into ttrss_feeds (title,feed_url) values ('RPGDot Newsfeed', | |
27 | 'http://www.rpgdot.com/team/rss/rss0.xml'); | |
28 | ||
29 | insert into ttrss_feeds (title,feed_url) values ('Digg.com News', | |
30 | 'http://digg.com/rss/index.xml'); | |
31 | ||
32 | insert into ttrss_feeds (title,feed_url) values ('Technocrat.net', | |
33 | 'http://syndication.technocrat.net/rss'); | |
34 | ||
35 | create table ttrss_entries (id integer not null primary key auto_increment, | |
1696229f | 36 | feed_id integer not null, |
8158c57a | 37 | updated datetime not null, |
9ad5b0de | 38 | title text not null, |
a0d5a39a | 39 | guid varchar(255) not null unique, |
49a0dd3d | 40 | link text not null, |
648472a7 AD |
41 | content text not null, |
42 | content_hash varchar(250) not null, | |
8158c57a AD |
43 | last_read datetime, |
44 | marked bool not null default 0, | |
45 | date_entered datetime not null, | |
46 | no_orig_date bool not null default 0, | |
648472a7 | 47 | comments varchar(250) not null default '', |
1696229f AD |
48 | unread bool not null default 1, |
49 | index (feed_id), | |
50 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB; | |
648472a7 AD |
51 | |
52 | drop table if exists ttrss_filters; | |
53 | drop table if exists ttrss_filter_types; | |
54 | ||
55 | create table ttrss_filter_types (id integer primary key, | |
56 | name varchar(120) unique not null, | |
4b3dff6e | 57 | description varchar(250) not null unique) TYPE=InnoDB; |
648472a7 | 58 | |
648472a7 AD |
59 | |
60 | insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title'); | |
61 | insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content'); | |
62 | insert into ttrss_filter_types (id,name,description) values (3, 'both', | |
63 | 'Title or Content'); | |
64 | ||
4b3dff6e | 65 | create table ttrss_filters (id integer primary key auto_increment, |
8158c57a | 66 | filter_type integer not null references ttrss_filter_types(id), |
4b3dff6e AD |
67 | reg_exp varchar(250) not null, |
68 | description varchar(250) not null default '') TYPE=InnoDB; | |
648472a7 | 69 | |
a82065a1 | 70 | drop table if exists ttrss_labels; |
48f0adb0 | 71 | |
a82065a1 | 72 | create table ttrss_labels (id integer primary key auto_increment, |
48f0adb0 | 73 | sql_exp varchar(250) not null, |
a82065a1 | 74 | description varchar(250) not null) TYPE=InnoDB; |
48f0adb0 | 75 | |
48f0adb0 AD |
76 | insert into ttrss_labels (sql_exp,description) values ('unread = true', |
77 | 'Unread articles'); | |
648472a7 | 78 | |
7cc6112a AD |
79 | insert into ttrss_labels (sql_exp,description) values ( |
80 | 'last_read is null and unread = false', 'Updated articles'); | |
81 | ||
eb36b4eb AD |
82 | create table ttrss_tags (id integer primary key auto_increment, |
83 | tag_name varchar(250) not null, | |
1696229f AD |
84 | post_id integer not null, |
85 | index (post_id), | |
86 | foreign key (post_id) references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB; | |
eb36b4eb | 87 | |
5f171894 AD |
88 | drop table ttrss_version; |
89 | ||
90 | create table ttrss_version (schema_version int not null) TYPE=InnoDB; | |
91 | ||
1089b16b | 92 | insert into ttrss_version values (2); |
5f171894 | 93 | |
2fb72ab9 AD |
94 | drop table ttrss_prefs; |
95 | drop table ttrss_prefs_types; | |
96 | drop table ttrss_prefs_sections; | |
97 | ||
e0257be1 AD |
98 | create table ttrss_prefs_types (id integer primary key, |
99 | type_name varchar(100) not null) TYPE=InnoDB; | |
100 | ||
101 | insert into ttrss_prefs_types (id, type_name) values (1, 'bool'); | |
102 | insert into ttrss_prefs_types (id, type_name) values (2, 'string'); | |
103 | insert into ttrss_prefs_types (id, type_name) values (3, 'integer'); | |
104 | ||
105 | create table ttrss_prefs_sections (id integer primary key, | |
106 | section_name varchar(100) not null) TYPE=InnoDB; | |
107 | ||
603e9ebe AD |
108 | insert into ttrss_prefs_sections (id, section_name) values (1, 'General'); |
109 | insert into ttrss_prefs_sections (id, section_name) values (2, 'Interface'); | |
650bc435 | 110 | insert into ttrss_prefs_sections (id, section_name) values (3, 'Advanced'); |
e0257be1 AD |
111 | |
112 | create table ttrss_prefs (pref_name varchar(250) primary key, | |
113 | type_id integer not null, | |
114 | section_id integer not null default 1, | |
603e9ebe AD |
115 | short_desc text not null, |
116 | help_text text not null default '', | |
e0257be1 AD |
117 | def_value text not null, |
118 | value text not null, | |
119 | index(type_id), | |
120 | foreign key (type_id) references ttrss_prefs_types(id), | |
121 | index(section_id), | |
122 | foreign key (section_id) references ttrss_prefs_sections(id)) TYPE=InnoDB; | |
123 | ||
4338e23d AD |
124 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('ENABLE_FEED_ICONS', 1, 'true', 'true', 'Enable icons in feedlist',2); |
125 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('ICONS_DIR', 2, 'icons', 'icons', 'Local directory for feed icons',1); | |
126 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('ICONS_URL', 2, 'icons', 'icons', 'Local URL for icons',1); | |
127 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', '60', 'Purge old posts after this number of days (0 - disables)',1); | |
128 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('UPDATE_POST_ON_CHECKSUM_CHANGE', 1, 'true', 'true', 'Update post on checksum change',1); | |
129 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('ENABLE_PREFS_CATCHUP_UNCATCHUP', 1, 'false', 'false', 'Enable catchup/uncatchup buttons in feed editor',2); | |
650bc435 | 130 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id,help_text) values('ENABLE_LABELS', 1, 'false', 'false', 'Enable labels',3, |
36990e33 AD |
131 | 'Experimental support for virtual feeds based on user crafted SQL queries. This feature is highly experimental and at this point not user friendly. Use with caution.'); |
132 | ||
4338e23d AD |
133 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', '30', 'Default interval between feed updates (in minutes)',1); |
134 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('DISPLAY_HEADER', 1, 'true', 'true', 'Display header',2); | |
135 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('DISPLAY_FOOTER', 1, 'true', 'true', 'Display footer',2); | |
136 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('USE_COMPACT_STYLESHEET', 1, 'false', 'false', 'Use compact stylesheet by default',2); | |
36990e33 AD |
137 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id,help_text) values('DEFAULT_ARTICLE_LIMIT', 3, '0', '0', 'Default article limit',2, |
138 | 'Default limit for articles to display, any custom number you like (0 - disables).'); | |
139 | ||
650bc435 | 140 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id,help_text) values('DAEMON_REFRESH_ONLY', 1, 'false', 'false', 'Daemon refresh only', 3, |
36990e33 AD |
141 | 'Updates to all feeds will only run when the backend script is invoked with a "daemon" option on the URI stem.'); |
142 | ||
143 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id,help_text) values('DISPLAY_FEEDLIST_ACTIONS', 1, 'false', 'false', 'Display feedlist actions',2, | |
144 | 'Display separate dropbox for feedlist actions, if disabled these actions are available in global actions menu.'); | |
145 | ||
4338e23d | 146 | insert into ttrss_prefs (pref_name,type_id,value,def_value,short_desc,section_id) values('ENABLE_SPLASH', 1, 'false', 'false', 'Enable loading splashscreen',2); |
5f171894 | 147 |