]> git.wh0rd.org - tt-rss.git/blobdiff - schema/ttrss_schema_mysql.sql
mysql schema: remove theme_id index pointing nowhere
[tt-rss.git] / schema / ttrss_schema_mysql.sql
index 3773d9a4538bec49399a3181e883bc8ee0fe5856..f8ff944c014f22b2ebcdf3671c411116f2f336ed 100644 (file)
@@ -1,6 +1,7 @@
 SET NAMES utf8;
 SET CHARACTER SET utf8;
 
+drop table if exists ttrss_error_log;
 drop table if exists ttrss_plugin_storage;
 drop table if exists ttrss_linked_feeds;
 drop table if exists ttrss_linked_instances;
@@ -13,6 +14,7 @@ drop table if exists ttrss_labels;
 drop table if exists ttrss_filters2_actions;
 drop table if exists ttrss_filters2_rules;
 drop table if exists ttrss_filters2;
+drop table if exists ttrss_filters;
 drop table if exists ttrss_filter_types;
 drop table if exists ttrss_filter_actions;
 drop table if exists ttrss_user_prefs;
@@ -42,7 +44,6 @@ create table ttrss_users (id integer primary key not null auto_increment,
        pwd_hash varchar(250) not null,
        last_login datetime default null,
        access_level integer not null default 0,
-       theme_id integer default null,
        email varchar(250) not null default '',
        full_name varchar(250) not null default '',
        email_digest bool not null default false,
@@ -51,7 +52,7 @@ create table ttrss_users (id integer primary key not null auto_increment,
        created datetime default null,
        twitter_oauth longtext default null,
        otp_enabled boolean not null default false,
-       index (theme_id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+       resetpass_token varchar(250) default null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
        'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10);
@@ -82,7 +83,7 @@ create table ttrss_counters_cache (
        value integer not null default 0,
        updated datetime not null,
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
-);
+) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 create index ttrss_counters_cache_feed_id_idx on ttrss_counters_cache(feed_id);
 create index ttrss_counters_cache_owner_uid_idx on ttrss_counters_cache(owner_uid);
@@ -94,7 +95,7 @@ create table ttrss_cat_counters_cache (
        value integer not null default 0,
        updated datetime not null,
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
-);
+) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 create index ttrss_cat_counters_cache_owner_uid_idx on ttrss_cat_counters_cache(owner_uid);
 
@@ -161,6 +162,7 @@ create table ttrss_entries (id integer not null primary key auto_increment,
        date_updated datetime not null,
        num_comments integer not null default 0,
        plugin_data longtext,
+       lang varchar(2),
        comments varchar(250) not null default '',
        author varchar(250) not null default '') ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
@@ -299,7 +301,7 @@ create table ttrss_tags (id integer primary key auto_increment,
 
 create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
-insert into ttrss_version values (117);
+insert into ttrss_version values (125);
 
 create table ttrss_enclosures (id integer primary key auto_increment,
        content_url text not null,
@@ -384,7 +386,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_HIDE_READ', 1, 'false', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_SORT_FEEDS_UNREAD', 1, 'false', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_THEME_ID', 2, '0', 1);
-insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_TIMEZONE', 2, 'UTC', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_TIMEZONE', 2, 'Automatic', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_STYLESHEET', 2, '', 2);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SORT_HEADLINES_BY_FEED_DATE', 1, 'false', 2);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_BROWSE_CATS', 1, 'true', 1);
@@ -392,10 +394,11 @@ insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('SSL_CER
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DIGEST_PREFERRED_TIME', 2, '00:00', 4);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_PREFS_SHOW_EMPTY_CATS', 1, 'false', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', 1);
-insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('AUTO_ASSIGN_LABELS', 1, 'true', 3);
+insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('AUTO_ASSIGN_LABELS', 1, 'false', 3);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_ENABLED_PLUGINS', 2, '', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', 1);
 insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_CSS_THEME', 2, '', 2);
+insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_LANGUAGE', 2, '', 2);
 
 update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
        'SORT_HEADLINES_BY_FEED_DATE',
@@ -431,7 +434,7 @@ create table ttrss_feedbrowser_cache (
        feed_url text not null,
        site_url text not null,
        title text not null,
-       subscribers integer not null) DEFAULT CHARSET=UTF8;
+       subscribers integer not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 create table ttrss_labels2 (id integer not null primary key auto_increment,
        owner_uid integer not null,
@@ -478,5 +481,15 @@ create table ttrss_plugin_storage (
        content longtext not null,
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
+create table ttrss_error_log(
+       id integer not null auto_increment primary key,
+       owner_uid integer,
+       errno integer not null,
+       errstr text not null,
+       filename text not null,
+       lineno integer not null,
+       context text not null,
+       created_at datetime not null,
+       foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 commit;