]>
Commit | Line | Data |
---|---|---|
84004f8c AD |
1 | SET NAMES utf8; |
2 | SET CHARACTER SET utf8; | |
150b4a2c | 3 | |
889a5f9f | 4 | drop table if exists ttrss_error_log; |
5d9abb1e | 5 | drop table if exists ttrss_plugin_storage; |
58fa1bbc AD |
6 | drop table if exists ttrss_linked_feeds; |
7 | drop table if exists ttrss_linked_instances; | |
8801fb01 | 8 | drop table if exists ttrss_access_keys; |
f8bfb81f AD |
9 | drop table if exists ttrss_user_labels2; |
10 | drop table if exists ttrss_labels2; | |
0c630ef3 | 11 | drop table if exists ttrss_feedbrowser_cache; |
81dde650 AD |
12 | drop table if exists ttrss_version; |
13 | drop table if exists ttrss_labels; | |
6aff7845 AD |
14 | drop table if exists ttrss_filters2_actions; |
15 | drop table if exists ttrss_filters2_rules; | |
16 | drop table if exists ttrss_filters2; | |
5ddc7504 | 17 | drop table if exists ttrss_filters; |
81dde650 | 18 | drop table if exists ttrss_filter_types; |
53d6935b | 19 | drop table if exists ttrss_filter_actions; |
81dde650 AD |
20 | drop table if exists ttrss_user_prefs; |
21 | drop table if exists ttrss_prefs; | |
22 | drop table if exists ttrss_prefs_types; | |
58fa1bbc | 23 | drop table if exists ttrss_prefs_sections; |
eb36b4eb | 24 | drop table if exists ttrss_tags; |
963d3314 | 25 | drop table if exists ttrss_enclosures; |
d9084cf2 | 26 | drop table if exists ttrss_settings_profiles; |
8caa7999 | 27 | drop table if exists ttrss_entry_comments; |
81dde650 | 28 | drop table if exists ttrss_user_entries; |
648472a7 | 29 | drop table if exists ttrss_entries; |
ab5eb26f | 30 | drop table if exists ttrss_scheduled_updates; |
4d736378 | 31 | drop table if exists ttrss_counters_cache; |
8a4c759e | 32 | drop table if exists ttrss_cat_counters_cache; |
648472a7 | 33 | drop table if exists ttrss_feeds; |
24902606 | 34 | drop table if exists ttrss_archived_feeds; |
4a9a8bd8 | 35 | drop table if exists ttrss_feed_categories; |
a6ccf566 | 36 | drop table if exists ttrss_users; |
e552e5a2 | 37 | drop table if exists ttrss_themes; |
36bfab86 | 38 | drop table if exists ttrss_sessions; |
e552e5a2 | 39 | |
855d0ecf AD |
40 | begin; |
41 | ||
a6ccf566 AD |
42 | create table ttrss_users (id integer primary key not null auto_increment, |
43 | login varchar(120) not null unique, | |
44 | pwd_hash varchar(250) not null, | |
f16ef236 | 45 | last_login datetime default null, |
e552e5a2 | 46 | access_level integer not null default 0, |
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, |
532e1afe | 55 | resetpass_token varchar(250) default null) 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 | 65 | parent_cat integer, |
b4f83063 | 66 | view_settings varchar(250) not null default '', |
9432bfa0 | 67 | foreign key (parent_cat) references ttrss_feed_categories(id) ON DELETE SET NULL, |
7bfeaa17 | 68 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
4a9a8bd8 | 69 | |
24902606 AD |
70 | create table ttrss_archived_feeds (id integer not null primary key, |
71 | owner_uid integer not null, | |
58fa1bbc AD |
72 | title varchar(200) not null, |
73 | feed_url text not null, | |
24902606 | 74 | site_url varchar(250) not null default '', |
7bfeaa17 | 75 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
24902606 | 76 | |
4d736378 AD |
77 | create table ttrss_counters_cache ( |
78 | feed_id integer not null, | |
79 | owner_uid integer not null, | |
80 | value integer not null default 0, | |
a1eba24b | 81 | updated datetime not null, |
8a4c759e | 82 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
4df07d50 | 83 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
8a4c759e | 84 | |
ed7f0ecd | 85 | create index ttrss_counters_cache_feed_id_idx on ttrss_counters_cache(feed_id); |
ed7f0ecd AD |
86 | create index ttrss_counters_cache_value_idx on ttrss_counters_cache(value); |
87 | ||
8a4c759e AD |
88 | create table ttrss_cat_counters_cache ( |
89 | feed_id integer not null, | |
90 | owner_uid integer not null, | |
91 | value integer not null default 0, | |
92 | updated datetime not null, | |
4d736378 | 93 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
4df07d50 | 94 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
4d736378 | 95 | |
648472a7 | 96 | create table ttrss_feeds (id integer not null auto_increment primary key, |
a6ccf566 | 97 | owner_uid integer not null, |
58fa1bbc | 98 | title varchar(200) not null, |
4a9a8bd8 | 99 | cat_id integer default null, |
58fa1bbc | 100 | feed_url text not null, |
648472a7 | 101 | icon_url varchar(250) not null default '', |
d148926e | 102 | update_interval integer not null default 0, |
1089b16b | 103 | purge_interval integer not null default 0, |
6497fb65 | 104 | last_updated datetime default null, |
0d276d67 | 105 | last_error varchar(250) not null default '', |
14118af3 | 106 | favicon_avg_color varchar(11) default null, |
a6ccf566 | 107 | site_url varchar(250) not null default '', |
e93a3c96 AD |
108 | auth_login varchar(250) not null default '', |
109 | auth_pass varchar(250) not null default '', | |
de99f500 | 110 | parent_feed integer default null, |
5b35b4de | 111 | private bool not null default false, |
70f6dbb1 | 112 | rtl_content bool not null default false, |
7da377ca | 113 | hidden bool not null default false, |
3dd9183c | 114 | include_in_digest boolean not null default true, |
fb67e2ba | 115 | cache_images boolean not null default false, |
bfd61d3f | 116 | hide_images boolean not null default false, |
87764a50 | 117 | cache_content boolean not null default false, |
155a2a53 | 118 | auth_pass_encrypted boolean not null default false, |
14fb4e91 | 119 | last_viewed datetime default null, |
3c50da83 | 120 | last_update_started datetime default null, |
e0382fd6 | 121 | always_display_enclosures boolean not null default false, |
5b8534ef | 122 | update_method integer not null default 0, |
56781036 | 123 | order_id integer not null default 0, |
9382ca84 | 124 | mark_unread_on_update boolean not null default false, |
74b046a1 | 125 | update_on_checksum_change boolean not null default false, |
9382ca84 | 126 | strip_images boolean not null default false, |
b4f83063 | 127 | view_settings varchar(250) not null default '', |
5ab9791f | 128 | pubsub_state integer not null default 0, |
382268c6 | 129 | favicon_last_checked datetime default null, |
df659891 | 130 | feed_language varchar(100) not null default '', |
4a9a8bd8 | 131 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, |
f0907182 | 132 | foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE SET NULL, |
7bfeaa17 | 133 | foreign key (parent_feed) references ttrss_feeds(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
a6ccf566 | 134 | |
58fa1bbc | 135 | insert into ttrss_feeds (owner_uid, title, feed_url) values |
1f8c187d | 136 | (1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php'); |
648472a7 | 137 | |
58fa1bbc AD |
138 | create table ttrss_entries (id integer not null primary key auto_increment, |
139 | title text not null, | |
140 | guid varchar(255) not null unique, | |
141 | link text not null, | |
142 | updated datetime not null, | |
8e54a21e | 143 | content longtext not null, |
648472a7 | 144 | content_hash varchar(250) not null, |
87764a50 | 145 | cached_content longtext, |
8158c57a | 146 | no_orig_date bool not null default 0, |
c62d62f6 | 147 | date_entered datetime not null, |
25ea2805 | 148 | date_updated datetime not null, |
eb40e11b | 149 | num_comments integer not null default 0, |
7bfb3dab | 150 | plugin_data longtext, |
6b461797 | 151 | lang varchar(2), |
4bc760da | 152 | comments varchar(250) not null default '', |
7bfeaa17 | 153 | author varchar(250) not null default '') ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
c62d62f6 | 154 | |
b60e1d86 | 155 | create index ttrss_entries_date_entered_index on ttrss_entries(date_entered); |
ed7f0ecd | 156 | create index ttrss_entries_updated_idx on ttrss_entries(updated); |
b60e1d86 | 157 | |
c62d62f6 AD |
158 | create table ttrss_user_entries ( |
159 | int_id integer not null primary key auto_increment, | |
160 | ref_id integer not null, | |
83cd33fc | 161 | uuid varchar(200) not null, |
58fa1bbc AD |
162 | feed_id int, |
163 | orig_feed_id int, | |
c62d62f6 AD |
164 | owner_uid integer not null, |
165 | marked bool not null default 0, | |
ffba8297 | 166 | published bool not null default 0, |
490c366d | 167 | tag_cache text not null, |
905ff52a | 168 | label_cache text not null, |
c62d62f6 | 169 | last_read datetime, |
afb6038e | 170 | score int not null default 0, |
8e54a21e | 171 | note longtext, |
7873d588 AD |
172 | last_marked datetime, |
173 | last_published datetime, | |
1696229f | 174 | unread bool not null default 1, |
c62d62f6 | 175 | foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE, |
a6ccf566 | 176 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE, |
24902606 | 177 | foreign key (orig_feed_id) references ttrss_archived_feeds(id) ON DELETE SET NULL, |
7bfeaa17 | 178 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
648472a7 | 179 | |
ed7f0ecd AD |
180 | create index ttrss_user_entries_unread_idx on ttrss_user_entries(unread); |
181 | ||
8caa7999 AD |
182 | create table ttrss_entry_comments (id integer not null primary key, |
183 | ref_id integer not null, | |
184 | owner_uid integer not null, | |
185 | private bool not null default 0, | |
186 | date_entered datetime not null, | |
187 | index (ref_id), | |
188 | foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE, | |
189 | index (owner_uid), | |
7bfeaa17 | 190 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
8caa7999 | 191 | |
58fa1bbc AD |
192 | create table ttrss_filter_types (id integer primary key, |
193 | name varchar(120) unique not null, | |
7bfeaa17 | 194 | description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
648472a7 | 195 | |
648472a7 AD |
196 | insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title'); |
197 | insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content'); | |
58fa1bbc | 198 | insert into ttrss_filter_types (id,name,description) values (3, 'both', |
648472a7 | 199 | 'Title or Content'); |
58fa1bbc | 200 | insert into ttrss_filter_types (id,name,description) values (4, 'link', |
3a933f22 | 201 | 'Link'); |
58fa1bbc | 202 | insert into ttrss_filter_types (id,name,description) values (5, 'date', |
75fa1e31 | 203 | 'Article Date'); |
fa3317be | 204 | insert into ttrss_filter_types (id,name,description) values (6, 'author', 'Author'); |
c3fc5e47 | 205 | insert into ttrss_filter_types (id,name,description) values (7, 'tag', 'Article Tags'); |
648472a7 | 206 | |
58fa1bbc AD |
207 | create table ttrss_filter_actions (id integer not null primary key, |
208 | name varchar(120) unique not null, | |
7bfeaa17 | 209 | description varchar(250) not null unique) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
53d6935b | 210 | |
58fa1bbc | 211 | insert into ttrss_filter_actions (id,name,description) values (1, 'filter', |
b9ad7cfa | 212 | 'Delete article'); |
53d6935b | 213 | |
58fa1bbc | 214 | insert into ttrss_filter_actions (id,name,description) values (2, 'catchup', |
53d6935b AD |
215 | 'Mark as read'); |
216 | ||
58fa1bbc | 217 | insert into ttrss_filter_actions (id,name,description) values (3, 'mark', |
dd7d3187 AD |
218 | 'Set starred'); |
219 | ||
58fa1bbc | 220 | insert into ttrss_filter_actions (id,name,description) values (4, 'tag', |
de07b5ee | 221 | 'Assign tags'); |
7cb9311b | 222 | |
58fa1bbc | 223 | insert into ttrss_filter_actions (id,name,description) values (5, 'publish', |
0c4811be AD |
224 | 'Publish article'); |
225 | ||
58fa1bbc | 226 | insert into ttrss_filter_actions (id,name,description) values (6, 'score', |
fdb7b03f AD |
227 | 'Modify score'); |
228 | ||
58fa1bbc | 229 | insert into ttrss_filter_actions (id,name,description) values (7, 'label', |
ceb30ba4 AD |
230 | 'Assign label'); |
231 | ||
5e736e45 AD |
232 | insert into ttrss_filter_actions (id,name,description) values (8, 'stop', |
233 | 'Stop / Do nothing'); | |
234 | ||
b8774453 AD |
235 | insert into ttrss_filter_actions (id,name,description) values (9, 'plugin', |
236 | 'Invoke plugin'); | |
237 | ||
6aff7845 AD |
238 | create table ttrss_filters2(id integer primary key auto_increment, |
239 | owner_uid integer not null, | |
240 | match_any_rule boolean not null default false, | |
241 | enabled boolean not null default true, | |
a3a896a1 | 242 | inverse bool not null default false, |
8e8c8934 AD |
243 | title varchar(250) not null default '', |
244 | order_id integer not null default 0, | |
6aff7845 | 245 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
fb70f26e | 246 | |
6aff7845 AD |
247 | create table ttrss_filters2_rules(id integer primary key auto_increment, |
248 | filter_id integer not null references ttrss_filters2(id) on delete cascade, | |
249 | reg_exp varchar(250) not null, | |
a3a896a1 | 250 | inverse bool not null default false, |
6aff7845 AD |
251 | filter_type integer not null, |
252 | feed_id integer default null, | |
253 | cat_id integer default null, | |
254 | cat_filter boolean not null default false, | |
255 | index (filter_id), | |
256 | foreign key (filter_id) references ttrss_filters2(id) on delete cascade, | |
257 | index (filter_type), | |
258 | foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE, | |
259 | index (feed_id), | |
260 | foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE, | |
261 | index (cat_id), | |
262 | foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
263 | ||
264 | create table ttrss_filters2_actions(id integer primary key auto_increment, | |
265 | filter_id integer not null, | |
266 | action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade, | |
267 | action_param varchar(250) not null default '', | |
268 | index (filter_id), | |
269 | foreign key (filter_id) references ttrss_filters2(id) on delete cascade, | |
270 | index (action_id), | |
271 | foreign key (action_id) references ttrss_filter_actions(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
272 | ||
58fa1bbc AD |
273 | create table ttrss_tags (id integer primary key auto_increment, |
274 | owner_uid integer not null, | |
eb36b4eb | 275 | tag_name varchar(250) not null, |
c62d62f6 AD |
276 | post_int_id integer not null, |
277 | index (post_int_id), | |
278 | foreign key (post_int_id) references ttrss_user_entries(int_id) ON DELETE CASCADE, | |
a6ccf566 | 279 | index (owner_uid), |
7bfeaa17 | 280 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
eb36b4eb | 281 | |
7bfeaa17 | 282 | create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
5f171894 | 283 | |
6497fb65 | 284 | insert into ttrss_version values (130); |
5f171894 | 285 | |
d9084cf2 | 286 | create table ttrss_enclosures (id integer primary key auto_increment, |
963d3314 AD |
287 | content_url text not null, |
288 | content_type varchar(250) not null, | |
289 | post_id integer not null, | |
aa6d1e97 | 290 | title text not null, |
ce53e200 | 291 | duration text not null, |
06c4c9eb FE |
292 | width integer not null default 0, |
293 | height integer not null default 0, | |
7bfeaa17 | 294 | foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
963d3314 | 295 | |
d9084cf2 AD |
296 | create table ttrss_settings_profiles(id integer primary key auto_increment, |
297 | title varchar(250) not null, | |
298 | owner_uid integer not null, | |
299 | index (owner_uid), | |
7bfeaa17 | 300 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
d9084cf2 | 301 | |
58fa1bbc | 302 | create table ttrss_prefs_types (id integer not null primary key, |
7bfeaa17 | 303 | type_name varchar(100) not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 AD |
304 | |
305 | insert into ttrss_prefs_types (id, type_name) values (1, 'bool'); | |
306 | insert into ttrss_prefs_types (id, type_name) values (2, 'string'); | |
307 | insert into ttrss_prefs_types (id, type_name) values (3, 'integer'); | |
308 | ||
58fa1bbc | 309 | create table ttrss_prefs_sections (id integer not null primary key, |
923b5c8b | 310 | order_id integer not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 | 311 | |
923b5c8b AD |
312 | insert into ttrss_prefs_sections (id, order_id) values (1, 0); |
313 | insert into ttrss_prefs_sections (id, order_id) values (2, 1); | |
314 | insert into ttrss_prefs_sections (id, order_id) values (3, 3); | |
315 | insert into ttrss_prefs_sections (id, order_id) values (4, 2); | |
e0257be1 | 316 | |
a6ccf566 | 317 | create table ttrss_prefs (pref_name varchar(250) not null primary key, |
e0257be1 AD |
318 | type_id integer not null, |
319 | section_id integer not null default 1, | |
2b6ed06b | 320 | access_level integer not null default 0, |
e0257be1 | 321 | def_value text not null, |
e0257be1 | 322 | foreign key (type_id) references ttrss_prefs_types(id), |
7bfeaa17 | 323 | foreign key (section_id) references ttrss_prefs_sections(id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
e0257be1 | 324 | |
923b5c8b AD |
325 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('PURGE_OLD_DAYS', 3, '60', 1); |
326 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 1); | |
327 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_ARTICLE_LIMIT', 3, '30', 2); | |
881a1580 | 328 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('ALLOW_DUPLICATE_POSTS', 1, 'false', 1); |
923b5c8b AD |
329 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('ENABLE_FEED_CATS', 1, 'true', 2); |
330 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SHOW_CONTENT_PREVIEW', 1, 'true', 2); | |
331 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SHORT_DATE_FORMAT', 2, 'M d, G:i', 3); | |
332 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('LONG_DATE_FORMAT', 2, 'D, M d Y - G:i', 3); | |
333 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('COMBINED_DISPLAY_MODE', 1, 'true', 2); | |
334 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('HIDE_READ_FEEDS', 1, 'false', 2); | |
335 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('ON_CATCHUP_SHOW_NEXT_FEED', 1, 'false', 2); | |
336 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('FEEDS_SORT_BY_UNREAD', 1, 'false', 2); | |
337 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('REVERSE_HEADLINES', 1, 'false', 2); | |
338 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DIGEST_ENABLE', 1, 'false', 4); | |
339 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('CONFIRM_FEED_CATCHUP', 1, 'true', 2); | |
340 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('CDM_AUTO_CATCHUP', 1, 'false', 2); | |
341 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_DEFAULT_VIEW_MODE', 2, 'adaptive', 1); | |
342 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_DEFAULT_VIEW_LIMIT', 3, '30', 1); | |
343 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_PREFS_ACTIVE_TAB', 2, '', 1); | |
344 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('STRIP_UNSAFE_TAGS', 1, 'true', 3); | |
345 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('BLACKLISTED_TAGS', 2, 'main, generic, misc, uncategorized, blog, blogroll, general, news', 3); | |
346 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('FRESH_ARTICLE_MAX_AGE', 3, '24', 2); | |
347 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DIGEST_CATCHUP', 1, 'false', 4); | |
348 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('CDM_EXPANDED', 1, 'true', 2); | |
349 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('PURGE_UNREAD_ARTICLES', 1, 'true', 3); | |
350 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('HIDE_READ_SHOWS_SPECIAL', 1, 'true', 2); | |
351 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('VFEED_GROUP_BY_FEED', 1, 'false', 2); | |
352 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('STRIP_IMAGES', 1, 'false', 2); | |
353 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_DEFAULT_VIEW_ORDER_BY', 2, 'default', 1); | |
354 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('ENABLE_API_ACCESS', 1, 'false', 1); | |
355 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_COLLAPSED_SPECIAL', 1, 'false', 1); | |
356 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_COLLAPSED_LABELS', 1, 'false', 1); | |
357 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_COLLAPSED_UNCAT', 1, 'false', 1); | |
358 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_COLLAPSED_FEEDLIST', 1, 'false', 1); | |
359 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_ENABLE_CATS', 1, 'false', 1); | |
360 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_SHOW_IMAGES', 1, 'false', 1); | |
361 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_HIDE_READ', 1, 'false', 1); | |
362 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_SORT_FEEDS_UNREAD', 1, 'false', 1); | |
363 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_THEME_ID', 2, '0', 1); | |
3fbb4d18 | 364 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_TIMEZONE', 2, 'Automatic', 1); |
923b5c8b AD |
365 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_STYLESHEET', 2, '', 2); |
366 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SORT_HEADLINES_BY_FEED_DATE', 1, 'false', 2); | |
367 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_BROWSE_CATS', 1, 'true', 1); | |
368 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SSL_CERT_SERIAL', 2, '', 3); | |
369 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DIGEST_PREFERRED_TIME', 2, '00:00', 4); | |
370 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_PREFS_SHOW_EMPTY_CATS', 1, 'false', 1); | |
371 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', 1); | |
2457679a | 372 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('AUTO_ASSIGN_LABELS', 1, 'false', 3); |
923b5c8b AD |
373 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_ENABLED_PLUGINS', 2, '', 1); |
374 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', 1); | |
375 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_CSS_THEME', 2, '', 2); | |
7b149552 | 376 | insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_LANGUAGE', 2, '', 2); |
5d40efc9 | 377 | |
f9ebb32c AD |
378 | update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED', |
379 | 'SORT_HEADLINES_BY_FEED_DATE', | |
380 | 'VFEED_GROUP_BY_FEED', | |
381 | 'FRESH_ARTICLE_MAX_AGE', | |
382 | 'CDM_EXPANDED', | |
383 | 'SHOW_CONTENT_PREVIEW', | |
b24504b1 | 384 | 'AUTO_ASSIGN_LABELS', |
f9ebb32c AD |
385 | 'HIDE_READ_SHOWS_SPECIAL'); |
386 | ||
a6ccf566 AD |
387 | create table ttrss_user_prefs ( |
388 | owner_uid integer not null, | |
389 | pref_name varchar(250), | |
88e4e597 | 390 | value longtext not null, |
d9084cf2 AD |
391 | profile integer, |
392 | index (profile), | |
393 | foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE, | |
a6ccf566 | 394 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, |
7bfeaa17 | 395 | foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
a6ccf566 | 396 | |
bd40827b | 397 | create table ttrss_sessions (id varchar(250) not null primary key, |
36bfab86 AD |
398 | data text, |
399 | expire integer not null, | |
7bfeaa17 | 400 | index (expire)) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
36bfab86 | 401 | |
0c630ef3 AD |
402 | create table ttrss_feedbrowser_cache ( |
403 | feed_url text not null, | |
109662e1 | 404 | site_url text not null, |
931dcbc1 | 405 | title text not null, |
4df07d50 | 406 | subscribers integer not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
0c630ef3 | 407 | |
58fa1bbc | 408 | create table ttrss_labels2 (id integer not null primary key auto_increment, |
ceb30ba4 AD |
409 | owner_uid integer not null, |
410 | caption varchar(250) not null, | |
aec57d7a AD |
411 | fg_color varchar(15) not null default '', |
412 | bg_color varchar(15) not null default '', | |
ceb30ba4 | 413 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE |
7bfeaa17 | 414 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
ceb30ba4 AD |
415 | |
416 | create table ttrss_user_labels2 (label_id integer not null, | |
417 | article_id integer not null, | |
418 | foreign key (label_id) references ttrss_labels2(id) ON DELETE CASCADE, | |
419 | foreign key (article_id) references ttrss_entries(id) ON DELETE CASCADE | |
7bfeaa17 | 420 | ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
ceb30ba4 | 421 | |
58fa1bbc | 422 | create table ttrss_access_keys (id integer not null primary key auto_increment, |
8801fb01 AD |
423 | access_key varchar(250) not null, |
424 | feed_id varchar(250) not null, | |
425 | is_cat bool not null default false, | |
426 | owner_uid integer not null, | |
7bfeaa17 | 427 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
8801fb01 | 428 | |
58fa1bbc | 429 | create table ttrss_linked_instances (id integer not null primary key auto_increment, |
afb875cc | 430 | last_connected datetime not null, |
cfc06471 AD |
431 | last_status_in integer not null, |
432 | last_status_out integer not null, | |
1eb3012f | 433 | access_key varchar(250) not null unique, |
7bfeaa17 | 434 | access_url text not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
58fa1bbc AD |
435 | |
436 | create table ttrss_linked_feeds ( | |
437 | feed_url text not null, | |
109662e1 | 438 | site_url text not null, |
58fa1bbc AD |
439 | title text not null, |
440 | created datetime not null, | |
441 | updated datetime not null, | |
442 | instance_id integer not null, | |
443 | subscribers integer not null, | |
7bfeaa17 | 444 | foreign key (instance_id) references ttrss_linked_instances(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; |
58fa1bbc | 445 | |
5d9abb1e AD |
446 | create table ttrss_plugin_storage ( |
447 | id integer not null auto_increment primary key, | |
448 | name varchar(100) not null, | |
449 | owner_uid integer not null, | |
450 | content longtext not null, | |
451 | foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
452 | ||
889a5f9f AD |
453 | create table ttrss_error_log( |
454 | id integer not null auto_increment primary key, | |
455 | owner_uid integer, | |
456 | errno integer not null, | |
457 | errstr text not null, | |
458 | filename text not null, | |
3fbb4d18 | 459 | lineno integer not null, |
889a5f9f AD |
460 | context text not null, |
461 | created_at datetime not null, | |
462 | foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8; | |
5d9abb1e | 463 | |
855d0ecf | 464 | commit; |