]>
Commit | Line | Data |
---|---|---|
84004f8c AD |
1 | SET NAMES utf8; |
2 | SET CHARACTER SET utf8; | |
150b4a2c | 3 | |
5d9abb1e | 4 | drop table if exists ttrss_plugin_storage; |
58fa1bbc AD |
5 | drop table if exists ttrss_linked_feeds; |
6 | drop table if exists ttrss_linked_instances; | |
8801fb01 | 7 | drop table if exists ttrss_access_keys; |
f8bfb81f AD |
8 | drop table if exists ttrss_user_labels2; |
9 | drop table if exists ttrss_labels2; | |
0c630ef3 | 10 | drop table if exists ttrss_feedbrowser_cache; |
81dde650 AD |
11 | drop table if exists ttrss_version; |
12 | drop table if exists ttrss_labels; | |
6aff7845 AD |
13 | drop table if exists ttrss_filters2_actions; |
14 | drop table if exists ttrss_filters2_rules; | |
15 | drop table if exists ttrss_filters2; | |
81dde650 AD |
16 | drop table if exists ttrss_filters; |
17 | drop table if exists ttrss_filter_types; | |
53d6935b | 18 | drop table if exists ttrss_filter_actions; |
81dde650 AD |
19 | drop table if exists ttrss_user_prefs; |
20 | drop table if exists ttrss_prefs; | |
21 | drop table if exists ttrss_prefs_types; | |
58fa1bbc | 22 | drop table if exists ttrss_prefs_sections; |
eb36b4eb | 23 | drop table if exists ttrss_tags; |
963d3314 | 24 | drop table if exists ttrss_enclosures; |
d9084cf2 | 25 | drop table if exists ttrss_settings_profiles; |
8caa7999 | 26 | drop table if exists ttrss_entry_comments; |
81dde650 | 27 | drop table if exists ttrss_user_entries; |
648472a7 | 28 | drop table if exists ttrss_entries; |
ab5eb26f | 29 | drop table if exists ttrss_scheduled_updates; |
4d736378 | 30 | drop table if exists ttrss_counters_cache; |
8a4c759e | 31 | drop table if exists ttrss_cat_counters_cache; |
648472a7 | 32 | drop table if exists ttrss_feeds; |
24902606 | 33 | drop table if exists ttrss_archived_feeds; |
4a9a8bd8 | 34 | drop table if exists ttrss_feed_categories; |
a6ccf566 | 35 | drop table if exists ttrss_users; |
e552e5a2 | 36 | drop table if exists ttrss_themes; |
36bfab86 | 37 | drop table if exists ttrss_sessions; |
e552e5a2 | 38 | |
855d0ecf AD |
39 | begin; |
40 | ||
a6ccf566 AD |
41 | create table ttrss_users (id integer primary key not null auto_increment, |
42 | login varchar(120) not null unique, | |
43 | pwd_hash varchar(250) not null, | |
f16ef236 | 44 | last_login datetime default null, |
e552e5a2 AD |
45 | access_level integer not null default 0, |
46 | theme_id integer default null, | |
8629e09d | 47 | email varchar(250) not null default '', |
73fe13af | 48 | full_name varchar(250) not null default '', |
32be4b10 AD |
49 | email_digest bool not null default false, |
50 | last_digest_sent datetime default null, | |
e90053fe | 51 | salt varchar(250) not null default '', |
54a3d3cf | 52 | created datetime default null, |
57e24c82 | 53 | twitter_oauth longtext default null, |
fb70f26e | 54 | otp_enabled boolean not null default false, |
7bfeaa17 | 55 | index (theme_id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
a6ccf566 | 56 | |
58fa1bbc | 57 | insert into ttrss_users (login,pwd_hash,access_level) values ('admin', |
7f16656e | 58 | 'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10); |
648472a7 | 59 | |
17095c5a | 60 | create table ttrss_feed_categories(id integer not null primary key auto_increment, |
5a214f9d AD |
61 | owner_uid integer not null, |
62 | title varchar(200) not null, | |
28bcadff | 63 | collapsed bool not null default false, |
782ddd70 | 64 | order_id integer not null default 0, |
9432bfa0 AD |
65 | parent_cat integer, |
66 | index(parent_cat), | |
67 | foreign key (parent_cat) references ttrss_feed_categories(id) ON DELETE SET NULL, | |
5a214f9d | 68 | index(owner_uid), |
7bfeaa17 | 69 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
4a9a8bd8 | 70 | |
24902606 AD |
71 | create table ttrss_archived_feeds (id integer not null primary key, |
72 | owner_uid integer not null, | |
58fa1bbc AD |
73 | title varchar(200) not null, |
74 | feed_url text not null, | |
24902606 AD |
75 | site_url varchar(250) not null default '', |
76 | index(owner_uid), | |
7bfeaa17 | 77 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
24902606 | 78 | |
4d736378 AD |
79 | create table ttrss_counters_cache ( |
80 | feed_id integer not null, | |
81 | owner_uid integer not null, | |
82 | value integer not null default 0, | |
a1eba24b | 83 | updated datetime not null, |
8a4c759e AD |
84 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
85 | ); | |
86 | ||
ed7f0ecd AD |
87 | create index ttrss_counters_cache_feed_id_idx on ttrss_counters_cache(feed_id); |
88 | create index ttrss_counters_cache_owner_uid_idx on ttrss_counters_cache(owner_uid); | |
89 | create index ttrss_counters_cache_value_idx on ttrss_counters_cache(value); | |
90 | ||
8a4c759e AD |
91 | create table ttrss_cat_counters_cache ( |
92 | feed_id integer not null, | |
93 | owner_uid integer not null, | |
94 | value integer not null default 0, | |
95 | updated datetime not null, | |
4d736378 AD |
96 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
97 | ); | |
98 | ||
ed7f0ecd AD |
99 | create index ttrss_cat_counters_cache_owner_uid_idx on ttrss_cat_counters_cache(owner_uid); |
100 | ||
648472a7 | 101 | create table ttrss_feeds (id integer not null auto_increment primary key, |
a6ccf566 | 102 | owner_uid integer not null, |
58fa1bbc | 103 | title varchar(200) not null, |
4a9a8bd8 | 104 | cat_id integer default null, |
58fa1bbc | 105 | feed_url text not null, |
648472a7 | 106 | icon_url varchar(250) not null default '', |
d148926e | 107 | update_interval integer not null default 0, |
1089b16b | 108 | purge_interval integer not null default 0, |
13b98333 | 109 | last_updated datetime default 0, |
0d276d67 | 110 | last_error varchar(250) not null default '', |
a6ccf566 | 111 | site_url varchar(250) not null default '', |
e93a3c96 AD |
112 | auth_login varchar(250) not null default '', |
113 | auth_pass varchar(250) not null default '', | |
de99f500 | 114 | parent_feed integer default null, |
5b35b4de | 115 | private bool not null default false, |
70f6dbb1 | 116 | rtl_content bool not null default false, |
7da377ca | 117 | hidden bool not null default false, |
3dd9183c | 118 | include_in_digest boolean not null default true, |
fb67e2ba | 119 | cache_images boolean not null default false, |
87764a50 | 120 | cache_content boolean not null default false, |
155a2a53 | 121 | auth_pass_encrypted boolean not null default false, |
14fb4e91 | 122 | last_viewed datetime default null, |
3c50da83 | 123 | last_update_started datetime default null, |
e0382fd6 | 124 | always_display_enclosures boolean not null default false, |
5b8534ef | 125 | update_method integer not null default 0, |
56781036 | 126 | order_id integer not null default 0, |
9382ca84 | 127 | mark_unread_on_update boolean not null default false, |
74b046a1 | 128 | update_on_checksum_change boolean not null default false, |
9382ca84 | 129 | strip_images boolean not null default false, |
5ab9791f | 130 | pubsub_state integer not null default 0, |
382268c6 | 131 | favicon_last_checked datetime default null, |
a6ccf566 | 132 | index(owner_uid), |
4a9a8bd8 AD |
133 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, |
134 | index(cat_id), | |
f0907182 | 135 | foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE SET NULL, |
de99f500 | 136 | index(parent_feed), |
7bfeaa17 | 137 | foreign key (parent_feed) references ttrss_feeds(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
a6ccf566 | 138 | |
44f1eeed AD |
139 | create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid); |
140 | create index ttrss_feeds_cat_id_idx on ttrss_feeds(cat_id); | |
141 | ||
078b5702 | 142 | insert into ttrss_feeds (owner_uid, title, feed_url) values |
1f8c187d | 143 | (1, 'Tiny Tiny RSS: New Releases', 'http://tt-rss.org/releases.rss'); |
078b5702 | 144 | |
58fa1bbc | 145 | insert into ttrss_feeds (owner_uid, title, feed_url) values |
1f8c187d | 146 | (1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php'); |
648472a7 | 147 | |
58fa1bbc AD |
148 | create table ttrss_entries (id integer not null primary key auto_increment, |
149 | title text not null, | |
150 | guid varchar(255) not null unique, | |
151 | link text not null, | |
152 | updated datetime not null, | |
8e54a21e | 153 | content longtext not null, |
648472a7 | 154 | content_hash varchar(250) not null, |
87764a50 | 155 | cached_content longtext, |
8158c57a | 156 | no_orig_date bool not null default 0, |
c62d62f6 | 157 | date_entered datetime not null, |
25ea2805 | 158 | date_updated datetime not null, |
eb40e11b | 159 | num_comments integer not null default 0, |
7bfb3dab | 160 | plugin_data longtext, |
4bc760da | 161 | comments varchar(250) not null default '', |
7bfeaa17 | 162 | author varchar(250) not null default '') ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
c62d62f6 | 163 | |
b60e1d86 | 164 | create index ttrss_entries_date_entered_index on ttrss_entries(date_entered); |
ed7f0ecd AD |
165 | create index ttrss_entries_guid_index on ttrss_entries(guid); |
166 | create index ttrss_entries_updated_idx on ttrss_entries(updated); | |
b60e1d86 | 167 | |
c62d62f6 AD |
168 | create table ttrss_user_entries ( |
169 | int_id integer not null primary key auto_increment, | |
170 | ref_id integer not null, | |
83cd33fc | 171 | uuid varchar(200) not null, |
58fa1bbc AD |
172 | feed_id int, |
173 | orig_feed_id int, | |
c62d62f6 AD |
174 | owner_uid integer not null, |
175 | marked bool not null default 0, | |
ffba8297 | 176 | published bool not null default 0, |
490c366d | 177 | tag_cache text not null, |
905ff52a | 178 | label_cache text not null, |
c62d62f6 | 179 | last_read datetime, |
afb6038e | 180 | score int not null default 0, |
8e54a21e | 181 | note longtext, |
1696229f | 182 | unread bool not null default 1, |
c62d62f6 AD |
183 | index (ref_id), |
184 | foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE, | |
1696229f | 185 | index (feed_id), |
a6ccf566 | 186 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE, |
e04c18a2 | 187 | index (orig_feed_id), |
24902606 | 188 | foreign key (orig_feed_id) references ttrss_archived_feeds(id) ON DELETE SET NULL, |
a6ccf566 | 189 | index (owner_uid), |
7bfeaa17 | 190 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
648472a7 | 191 | |
8514e925 AD |
192 | create index ttrss_user_entries_owner_uid_index on ttrss_user_entries(owner_uid); |
193 | create index ttrss_user_entries_ref_id_index on ttrss_user_entries(ref_id); | |
194 | create index ttrss_user_entries_feed_id on ttrss_user_entries(feed_id); | |
ed7f0ecd AD |
195 | create index ttrss_user_entries_unread_idx on ttrss_user_entries(unread); |
196 | ||
8caa7999 AD |
197 | create table ttrss_entry_comments (id integer not null primary key, |
198 | ref_id integer not null, | |
199 | owner_uid integer not null, | |
200 | private bool not null default 0, | |
201 | date_entered datetime not null, | |
202 | index (ref_id), | |
203 | foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE, | |
204 | index (owner_uid), | |
7bfeaa17 | 205 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
8caa7999 | 206 | |
58fa1bbc AD |
207 | create table ttrss_filter_types (id integer primary key, |
208 | name varchar(120) unique not null, | |
7bfeaa17 | 209 | description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
648472a7 | 210 | |
648472a7 AD |
211 | insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title'); |
212 | insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content'); | |
58fa1bbc | 213 | insert into ttrss_filter_types (id,name,description) values (3, 'both', |
648472a7 | 214 | 'Title or Content'); |
58fa1bbc | 215 | insert into ttrss_filter_types (id,name,description) values (4, 'link', |
3a933f22 | 216 | 'Link'); |
58fa1bbc | 217 | insert into ttrss_filter_types (id,name,description) values (5, 'date', |
75fa1e31 | 218 | 'Article Date'); |
fa3317be | 219 | insert into ttrss_filter_types (id,name,description) values (6, 'author', 'Author'); |
c3fc5e47 | 220 | insert into ttrss_filter_types (id,name,description) values (7, 'tag', 'Article Tags'); |
648472a7 | 221 | |
58fa1bbc AD |
222 | create table ttrss_filter_actions (id integer not null primary key, |
223 | name varchar(120) unique not null, | |
7bfeaa17 | 224 | description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
53d6935b | 225 | |
58fa1bbc | 226 | insert into ttrss_filter_actions (id,name,description) values (1, 'filter', |
b9ad7cfa | 227 | 'Delete article'); |
53d6935b | 228 | |
58fa1bbc | 229 | insert into ttrss_filter_actions (id,name,description) values (2, 'catchup', |
53d6935b AD |
230 | 'Mark as read'); |
231 | ||
58fa1bbc | 232 | insert into ttrss_filter_actions (id,name,description) values (3, 'mark', |
dd7d3187 AD |
233 | 'Set starred'); |
234 | ||
58fa1bbc | 235 | insert into ttrss_filter_actions (id,name,description) values (4, 'tag', |
de07b5ee | 236 | 'Assign tags'); |
7cb9311b | 237 | |
58fa1bbc | 238 | insert into ttrss_filter_actions (id,name,description) values (5, 'publish', |
0c4811be AD |
239 | 'Publish article'); |
240 | ||
58fa1bbc | 241 | insert into ttrss_filter_actions (id,name,description) values (6, 'score', |
fdb7b03f AD |
242 | 'Modify score'); |
243 | ||
58fa1bbc | 244 | insert into ttrss_filter_actions (id,name,description) values (7, 'label', |
ceb30ba4 AD |
245 | 'Assign label'); |
246 | ||
a6ccf566 | 247 | create table ttrss_filters (id integer not null primary key auto_increment, |
58fa1bbc | 248 | owner_uid integer not null, |
2bbd16b9 | 249 | feed_id integer default null, |
a6ccf566 | 250 | filter_type integer not null, |
4b3dff6e | 251 | reg_exp varchar(250) not null, |
2362de6d | 252 | filter_param varchar(250) not null default '', |
3f2ff803 | 253 | inverse bool not null default false, |
4fd52ba4 | 254 | enabled bool not null default true, |
ba975b2e AD |
255 | cat_filter bool not null default false, |
256 | cat_id integer default null, | |
53d6935b | 257 | action_id integer not null default 1, |
91d64fb8 | 258 | action_param varchar(250) not null default '', |
a6ccf566 AD |
259 | index (filter_type), |
260 | foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE, | |
261 | index (owner_uid), | |
2bbd16b9 AD |
262 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, |
263 | index (feed_id), | |
53d6935b | 264 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE, |
ba975b2e AD |
265 | index (cat_id), |
266 | foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE CASCADE, | |
53d6935b | 267 | index (action_id), |
7bfeaa17 | 268 | foreign key (action_id) references ttrss_filter_actions(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
648472a7 | 269 | |
6aff7845 AD |
270 | create table ttrss_filters2(id integer primary key auto_increment, |
271 | owner_uid integer not null, | |
272 | match_any_rule boolean not null default false, | |
273 | enabled boolean not null default true, | |
274 | index(owner_uid), | |
275 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
fb70f26e | 276 | |
6aff7845 AD |
277 | create table ttrss_filters2_rules(id integer primary key auto_increment, |
278 | filter_id integer not null references ttrss_filters2(id) on delete cascade, | |
279 | reg_exp varchar(250) not null, | |
280 | filter_type integer not null, | |
281 | feed_id integer default null, | |
282 | cat_id integer default null, | |
283 | cat_filter boolean not null default false, | |
284 | index (filter_id), | |
285 | foreign key (filter_id) references ttrss_filters2(id) on delete cascade, | |
286 | index (filter_type), | |
287 | foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE, | |
288 | index (feed_id), | |
289 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE, | |
290 | index (cat_id), | |
291 | foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
292 | ||
293 | create table ttrss_filters2_actions(id integer primary key auto_increment, | |
294 | filter_id integer not null, | |
295 | action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade, | |
296 | action_param varchar(250) not null default '', | |
297 | index (filter_id), | |
298 | foreign key (filter_id) references ttrss_filters2(id) on delete cascade, | |
299 | index (action_id), | |
300 | foreign key (action_id) references ttrss_filter_actions(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
301 | ||
58fa1bbc AD |
302 | create table ttrss_tags (id integer primary key auto_increment, |
303 | owner_uid integer not null, | |
eb36b4eb | 304 | tag_name varchar(250) not null, |
c62d62f6 AD |
305 | post_int_id integer not null, |
306 | index (post_int_id), | |
307 | foreign key (post_int_id) references ttrss_user_entries(int_id) ON DELETE CASCADE, | |
a6ccf566 | 308 | index (owner_uid), |
7bfeaa17 | 309 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
eb36b4eb | 310 | |
7bfeaa17 | 311 | create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
5f171894 | 312 | |
d26859b5 | 313 | insert into ttrss_version values (104); |
5f171894 | 314 | |
d9084cf2 | 315 | create table ttrss_enclosures (id integer primary key auto_increment, |
963d3314 AD |
316 | content_url text not null, |
317 | content_type varchar(250) not null, | |
318 | post_id integer not null, | |
aa6d1e97 | 319 | title text not null, |
ce53e200 | 320 | duration text not null, |
963d3314 | 321 | index (post_id), |
7bfeaa17 | 322 | foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
963d3314 | 323 | |
f0143d4e AD |
324 | create index ttrss_enclosures_post_id_idx on ttrss_enclosures(post_id); |
325 | ||
d9084cf2 AD |
326 | create table ttrss_settings_profiles(id integer primary key auto_increment, |
327 | title varchar(250) not null, | |
328 | owner_uid integer not null, | |
329 | index (owner_uid), | |
7bfeaa17 | 330 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
d9084cf2 | 331 | |
58fa1bbc | 332 | create table ttrss_prefs_types (id integer not null primary key, |
7bfeaa17 | 333 | type_name varchar(100) not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 AD |
334 | |
335 | insert into ttrss_prefs_types (id, type_name) values (1, 'bool'); | |
336 | insert into ttrss_prefs_types (id, type_name) values (2, 'string'); | |
337 | insert into ttrss_prefs_types (id, type_name) values (3, 'integer'); | |
338 | ||
58fa1bbc | 339 | create table ttrss_prefs_sections (id integer not null primary key, |
f9ebb32c | 340 | order_id integer not null, |
7bfeaa17 | 341 | section_name varchar(100) not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 | 342 | |
f9ebb32c AD |
343 | insert into ttrss_prefs_sections (id, section_name, order_id) values (1, 'General', 0); |
344 | insert into ttrss_prefs_sections (id, section_name, order_id) values (2, 'Interface', 1); | |
345 | insert into ttrss_prefs_sections (id, section_name, order_id) values (3, 'Advanced', 3); | |
346 | insert into ttrss_prefs_sections (id, section_name, order_id) values (4, 'Digest', 2); | |
e0257be1 | 347 | |
a6ccf566 | 348 | create table ttrss_prefs (pref_name varchar(250) not null primary key, |
e0257be1 AD |
349 | type_id integer not null, |
350 | section_id integer not null default 1, | |
603e9ebe | 351 | short_desc text not null, |
2918ff5e | 352 | help_text varchar(250) not null default '', |
2b6ed06b | 353 | access_level integer not null default 0, |
e0257be1 | 354 | def_value text not null, |
e0257be1 AD |
355 | index(type_id), |
356 | foreign key (type_id) references ttrss_prefs_types(id), | |
357 | index(section_id), | |
7bfeaa17 | 358 | foreign key (section_id) references ttrss_prefs_sections(id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 | 359 | |
2ced2bb8 AD |
360 | create index ttrss_prefs_pref_name_idx on ttrss_prefs(pref_name); |
361 | ||
f9ebb32c | 362 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge articles after this number of days (0 - disables)',1); |
a6ccf566 | 363 | |
fbe2ea1c | 364 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1); |
6f068202 AD |
365 | |
366 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_ARTICLE_LIMIT', 3, '30', 'Amount of articles to display at once',2); | |
a6ccf566 | 367 | |
30b6ee8c | 368 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ALLOW_DUPLICATE_POSTS', 1, 'true', 'Allow duplicate posts',1, 'This option is useful when you are reading several planet-type aggregators with partially colliding userbase. When disabled, it forces same posts from different feeds to appear only once.'); |
386d7b5b | 369 | |
b4a3e2ff | 370 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_CATS', 1, 'true', 'Enable feed categories',2); |
10dc37ac | 371 | |
591c396d | 372 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHOW_CONTENT_PREVIEW', 1, 'true', 'Show content preview in headlines list',2); |
10dc37ac | 373 | |
8fe19cd8 AD |
374 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHORT_DATE_FORMAT', 2, 'M d, G:i', 'Short date format',3); |
375 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('LONG_DATE_FORMAT', 2, 'D, M d Y - G:i', 'Long date format',3); | |
376 | ||
30b6ee8c | 377 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2, 'Display expanded list of feed articles, instead of separate displays for headlines and article content'); |
386cbf27 | 378 | |
7f123cda AD |
379 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2); |
380 | ||
af0845ca | 381 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ON_CATCHUP_SHOW_NEXT_FEED', 1, 'false', 'On catchup show next feed',2, 'Automatically open next feed with unread articles after marking one as read'); |
e52d6bc4 | 382 | |
c9268ed5 AD |
383 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('FEEDS_SORT_BY_UNREAD', 1, 'false', 'Sort feeds by unread articles count',2); |
384 | ||
d6e5706d AD |
385 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2); |
386 | ||
f9ebb32c | 387 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_ENABLE', 1, 'false', 'Enable e-mail digest',4, 'This option enables sending daily digest of new (and unread) headlines on your configured e-mail address'); |
9a61ce6d | 388 | |
f9ebb32c | 389 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('CONFIRM_FEED_CATCHUP', 1, 'true', 'Confirm marking feed as read',2); |
f6d6e22f | 390 | |
f9ebb32c | 391 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('CDM_AUTO_CATCHUP', 1, 'false', 'Automatically mark articles as read',2, 'This option enables marking articles as read automatically while you scroll article list.'); |
724d7444 | 392 | |
40496720 AD |
393 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_MODE', 2, 'adaptive', '', 1); |
394 | ||
395 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1); | |
396 | ||
fe8d2059 | 397 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 2, '', '', 1); |
87b9fb65 | 398 | |
30b6ee8c | 399 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('STRIP_UNSAFE_TAGS', 1, 'true', 'Strip unsafe tags from articles', 3, 'Strip all but most common HTML tags when reading articles.'); |
feead173 | 400 | |
30b6ee8c | 401 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('BLACKLISTED_TAGS', 2, 'main, generic, misc, uncategorized, blog, blogroll, general, news', 'Blacklisted tags', 3, 'When auto-detecting tags in articles these tags will not be applied (comma-separated list).'); |
c59d33a3 | 402 | |
c1d7e6c3 AD |
403 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('FRESH_ARTICLE_MAX_AGE', 3, '24', 'Maximum age of fresh articles (in hours)',2); |
404 | ||
f9ebb32c | 405 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DIGEST_CATCHUP', 1, 'false', 'Mark articles in e-mail digest as read',4); |
dc85be2b | 406 | |
f9ebb32c | 407 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('CDM_EXPANDED', 1, 'true', 'Automatically expand articles in combined mode',2); |
bef4c245 | 408 | |
07d0efe9 AD |
409 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_UNREAD_ARTICLES', 1, 'true', 'Purge unread articles',3); |
410 | ||
f9ebb32c | 411 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_SHOWS_SPECIAL', 1, 'true', 'Show special feeds when hiding read feeds',2); |
22f3e356 | 412 | |
30b6ee8c | 413 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('VFEED_GROUP_BY_FEED', 1, 'false', 'Group headlines in virtual feeds',2, 'When this option is enabled, headlines in Special feeds and Labels are grouped by feeds'); |
d234a2e3 | 414 | |
d26859b5 | 415 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Hide images in articles', 2); |
8dccabed | 416 | |
7b4d02a8 AD |
417 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_ORDER_BY', 2, 'default', '', 1); |
418 | ||
f9ebb32c | 419 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_API_ACCESS', 1, 'false', 'Enable external API', 1); |
3a216db4 | 420 | |
57937c42 AD |
421 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_SPECIAL', 1, 'false', '', 1); |
422 | ||
423 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_LABELS', 1, 'false', '', 1); | |
424 | ||
425 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_UNCAT', 1, 'false', '', 1); | |
426 | ||
427 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_COLLAPSED_FEEDLIST', 1, 'false', '', 1); | |
428 | ||
e9105eb5 AD |
429 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_ENABLE_CATS', 1, 'false', '', 1); |
430 | ||
431 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_SHOW_IMAGES', 1, 'false', '', 1); | |
432 | ||
433 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_HIDE_READ', 1, 'false', '', 1); | |
434 | ||
435 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_SORT_FEEDS_UNREAD', 1, 'false', '', 1); | |
436 | ||
dce46cad | 437 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_THEME_ID', 2, '0', '', 1); |
d9084cf2 | 438 | |
324944f3 AD |
439 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1); |
440 | ||
88e4e597 AD |
441 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('USER_STYLESHEET', 2, '', 'Customize stylesheet', 2, 'Customize CSS stylesheet to your liking'); |
442 | ||
f9ebb32c | 443 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('SORT_HEADLINES_BY_FEED_DATE', 1, 'true', 'Sort headlines by feed date',2, 'Use feed-specified date to sort headlines instead of local import date.'); |
cfad9259 AD |
444 | |
445 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_BROWSE_CATS', 1, 'true', '', 1); | |
3d72afa1 | 446 | |
8de8bfb8 | 447 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('SSL_CERT_SERIAL', 2, '', 'Login with an SSL certificate',3, 'Click to register your SSL client certificate with tt-rss'); |
b3990c92 | 448 | |
f9ebb32c | 449 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_PREFERRED_TIME', 2, '00:00', 'Try to send digests around specified time', 4, 'Uses UTC timezone'); |
61c1812f | 450 | |
5b7bd238 AD |
451 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_SHOW_EMPTY_CATS', 1, 'false', '', 1); |
452 | ||
e07f8981 AD |
453 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 1); |
454 | ||
b24504b1 AD |
455 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('AUTO_ASSIGN_LABELS', 1, 'true', 'Assign articles to labels automatically', 3); |
456 | ||
de612e7a AD |
457 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_ENABLED_PLUGINS', 2, '', '', 1); |
458 | ||
a6b45187 AD |
459 | insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1); |
460 | ||
f9ebb32c AD |
461 | update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED', |
462 | 'SORT_HEADLINES_BY_FEED_DATE', | |
463 | 'VFEED_GROUP_BY_FEED', | |
464 | 'FRESH_ARTICLE_MAX_AGE', | |
465 | 'CDM_EXPANDED', | |
466 | 'SHOW_CONTENT_PREVIEW', | |
b24504b1 | 467 | 'AUTO_ASSIGN_LABELS', |
f9ebb32c AD |
468 | 'HIDE_READ_SHOWS_SPECIAL'); |
469 | ||
a6ccf566 AD |
470 | create table ttrss_user_prefs ( |
471 | owner_uid integer not null, | |
472 | pref_name varchar(250), | |
88e4e597 | 473 | value longtext not null, |
d9084cf2 AD |
474 | profile integer, |
475 | index (profile), | |
476 | foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE, | |
a6ccf566 AD |
477 | index (owner_uid), |
478 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, | |
479 | index (pref_name), | |
7bfeaa17 | 480 | foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
a6ccf566 | 481 | |
2ced2bb8 AD |
482 | create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid); |
483 | create index ttrss_user_prefs_pref_name_idx on ttrss_user_prefs(pref_name); | |
484 | ||
04febb04 | 485 | create table ttrss_sessions (id varchar(250) unique not null primary key, |
36bfab86 AD |
486 | data text, |
487 | expire integer not null, | |
58fa1bbc | 488 | index (id), |
7bfeaa17 | 489 | index (expire)) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
36bfab86 | 490 | |
0c630ef3 AD |
491 | create table ttrss_feedbrowser_cache ( |
492 | feed_url text not null, | |
109662e1 | 493 | site_url text not null, |
931dcbc1 | 494 | title text not null, |
58fa1bbc | 495 | subscribers integer not null) DEFAULT CHARSET=UTF8; |
0c630ef3 | 496 | |
58fa1bbc | 497 | create table ttrss_labels2 (id integer not null primary key auto_increment, |
ceb30ba4 AD |
498 | owner_uid integer not null, |
499 | caption varchar(250) not null, | |
aec57d7a AD |
500 | fg_color varchar(15) not null default '', |
501 | bg_color varchar(15) not null default '', | |
ceb30ba4 | 502 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
7bfeaa17 | 503 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
ceb30ba4 AD |
504 | |
505 | create table ttrss_user_labels2 (label_id integer not null, | |
506 | article_id integer not null, | |
507 | foreign key (label_id) references ttrss_labels2(id) ON DELETE CASCADE, | |
508 | foreign key (article_id) references ttrss_entries(id) ON DELETE CASCADE | |
7bfeaa17 | 509 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
ceb30ba4 | 510 | |
58fa1bbc | 511 | create table ttrss_access_keys (id integer not null primary key auto_increment, |
8801fb01 AD |
512 | access_key varchar(250) not null, |
513 | feed_id varchar(250) not null, | |
514 | is_cat bool not null default false, | |
515 | owner_uid integer not null, | |
7bfeaa17 | 516 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
8801fb01 | 517 | |
58fa1bbc | 518 | create table ttrss_linked_instances (id integer not null primary key auto_increment, |
afb875cc | 519 | last_connected datetime not null, |
cfc06471 AD |
520 | last_status_in integer not null, |
521 | last_status_out integer not null, | |
1eb3012f | 522 | access_key varchar(250) not null unique, |
7bfeaa17 | 523 | access_url text not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
58fa1bbc AD |
524 | |
525 | create table ttrss_linked_feeds ( | |
526 | feed_url text not null, | |
109662e1 | 527 | site_url text not null, |
58fa1bbc AD |
528 | title text not null, |
529 | created datetime not null, | |
530 | updated datetime not null, | |
531 | instance_id integer not null, | |
532 | subscribers integer not null, | |
7bfeaa17 | 533 | foreign key (instance_id) references ttrss_linked_instances(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
58fa1bbc | 534 | |
5d9abb1e AD |
535 | create table ttrss_plugin_storage ( |
536 | id integer not null auto_increment primary key, | |
537 | name varchar(100) not null, | |
538 | owner_uid integer not null, | |
539 | content longtext not null, | |
540 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
541 | ||
542 | ||
855d0ecf | 543 | commit; |