From e1f76af0068bd2cf5ce4a4203b7727d5b3111c04 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Apr 2013 22:01:02 +0400 Subject: block listing of several util directories; deny access to config.php --- schema/.htaccess | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 schema/.htaccess (limited to 'schema') diff --git a/schema/.htaccess b/schema/.htaccess new file mode 100644 index 000000000..93169e4eb --- /dev/null +++ b/schema/.htaccess @@ -0,0 +1,2 @@ +Order deny,allow +Deny from all -- cgit v1.2.3 From 2cfbb448fb197837c063c377c042beb3ba704a52 Mon Sep 17 00:00:00 2001 From: moontear Date: Mon, 15 Apr 2013 12:28:52 +0200 Subject: Added average color calculation of feeds' favicons for banded display. --- schema/versions/mysql/117.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 schema/versions/mysql/117.sql (limited to 'schema') diff --git a/schema/versions/mysql/117.sql b/schema/versions/mysql/117.sql new file mode 100644 index 000000000..008f819ed --- /dev/null +++ b/schema/versions/mysql/117.sql @@ -0,0 +1,7 @@ +begin; + +ALTER TABLE `ttrss_feeds` ADD favicon_avg_color VARCHAR(11) + +update ttrss_version set schema_version = 117; + +commit; -- cgit v1.2.3 From 14118af36f2ba65a4e5151ee33b6ad565492cbf0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Apr 2013 14:54:17 +0400 Subject: fix schema for favicon_avg_color --- schema/ttrss_schema_mysql.sql | 3 ++- schema/ttrss_schema_pgsql.sql | 3 ++- schema/versions/mysql/117.sql | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'schema') diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 9ed63f42a..3773d9a45 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -108,6 +108,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, purge_interval integer not null default 0, last_updated datetime default 0, last_error varchar(250) not null default '', + favicon_avg_color varchar(11) default null, site_url varchar(250) not null default '', auth_login varchar(250) not null default '', auth_pass varchar(250) not null default '', @@ -298,7 +299,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 (116); +insert into ttrss_version values (117); create table ttrss_enclosures (id integer primary key auto_increment, content_url text not null, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index ec3b778cc..3fc58555d 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -70,6 +70,7 @@ create table ttrss_feeds (id serial not null primary key, purge_interval integer not null default 0, last_updated timestamp default null, last_error text not null default '', + favicon_avg_color varchar(11) default null, site_url varchar(250) not null default '', auth_login varchar(250) not null default '', parent_feed integer default null references ttrss_feeds(id) on delete set null, @@ -256,7 +257,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (116); +insert into ttrss_version values (117); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/versions/mysql/117.sql b/schema/versions/mysql/117.sql index 008f819ed..da3d056cc 100644 --- a/schema/versions/mysql/117.sql +++ b/schema/versions/mysql/117.sql @@ -1,6 +1,7 @@ begin; -ALTER TABLE `ttrss_feeds` ADD favicon_avg_color VARCHAR(11) +ALTER TABLE ttrss_feeds ADD COLUMN favicon_avg_color VARCHAR(11); +alter table ttrss_feeds alter column favicon_avg_color set default null; update ttrss_version set schema_version = 117; -- cgit v1.2.3 From 646aeb70011c60e781baa869faf00bf05bea1568 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Apr 2013 15:38:20 +0400 Subject: add schema version 177 upgrade scripts --- schema/versions/pgsql/117.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 schema/versions/pgsql/117.sql (limited to 'schema') diff --git a/schema/versions/pgsql/117.sql b/schema/versions/pgsql/117.sql new file mode 100644 index 000000000..da3d056cc --- /dev/null +++ b/schema/versions/pgsql/117.sql @@ -0,0 +1,8 @@ +begin; + +ALTER TABLE ttrss_feeds ADD COLUMN favicon_avg_color VARCHAR(11); +alter table ttrss_feeds alter column favicon_avg_color set default null; + +update ttrss_version set schema_version = 117; + +commit; -- cgit v1.2.3 From 889a5f9f195309df5842f142986b3166212d8a58 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Apr 2013 19:41:31 +0400 Subject: experimental SQL-based error logger --- schema/ttrss_schema_mysql.sql | 13 ++++++++++++- schema/ttrss_schema_pgsql.sql | 13 ++++++++++++- schema/versions/mysql/118.sql | 16 ++++++++++++++++ schema/versions/pgsql/118.sql | 15 +++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 schema/versions/mysql/118.sql create mode 100644 schema/versions/pgsql/118.sql (limited to 'schema') diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 3773d9a45..0d0a8f460 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -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; @@ -299,7 +300,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 (118); create table ttrss_enclosures (id integer primary key auto_increment, content_url text not null, @@ -478,5 +479,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; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 3fc58555d..d81f65f2b 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -1,3 +1,4 @@ +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; @@ -257,7 +258,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (117); +insert into ttrss_version values (118); create table ttrss_enclosures (id serial not null primary key, content_url text not null, @@ -421,4 +422,14 @@ create table ttrss_plugin_storage ( owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, content text not null); +create table ttrss_error_log( + id serial not null primary key, + owner_uid integer references ttrss_users(id) ON DELETE SET NULL, + errno integer not null, + errstr text not null, + filename text not null, + lineno integer not null, + context text not null, + created_at timestamp not null); + commit; diff --git a/schema/versions/mysql/118.sql b/schema/versions/mysql/118.sql new file mode 100644 index 000000000..add2b0c1f --- /dev/null +++ b/schema/versions/mysql/118.sql @@ -0,0 +1,16 @@ +begin; + +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; + +update ttrss_version set schema_version = 118; + +commit; diff --git a/schema/versions/pgsql/118.sql b/schema/versions/pgsql/118.sql new file mode 100644 index 000000000..161cf4e3c --- /dev/null +++ b/schema/versions/pgsql/118.sql @@ -0,0 +1,15 @@ +begin; + +create table ttrss_error_log( + id serial not null primary key, + owner_uid integer references ttrss_users(id) ON DELETE SET NULL, + errno integer not null, + errstr text not null, + filename text not null, + lineno integer not null, + context text not null, + created_at timestamp not null); + +update ttrss_version set schema_version = 118; + +commit; -- cgit v1.2.3 From 3fbb4d183d6b0cb4b6d9d2d8d62d635eb70ebf13 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 26 Apr 2013 14:15:57 +0400 Subject: set default timezone to automatic (bump schema) --- schema/ttrss_schema_mysql.sql | 6 +++--- schema/ttrss_schema_pgsql.sql | 6 +++--- schema/versions/mysql/119.sql | 7 +++++++ schema/versions/pgsql/119.sql | 7 +++++++ 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 schema/versions/mysql/119.sql create mode 100644 schema/versions/pgsql/119.sql (limited to 'schema') diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 0d0a8f460..efa7be7cf 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -300,7 +300,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 (118); +insert into ttrss_version values (119); create table ttrss_enclosures (id integer primary key auto_increment, content_url text not null, @@ -385,7 +385,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); @@ -485,7 +485,7 @@ create table ttrss_error_log( errno integer not null, errstr text not null, filename text not null, - lineno integer 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; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index d81f65f2b..c04e5224b 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -258,7 +258,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (118); +insert into ttrss_version values (119); create table ttrss_enclosures (id serial not null primary key, content_url text not null, @@ -336,7 +336,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); @@ -428,7 +428,7 @@ create table ttrss_error_log( errno integer not null, errstr text not null, filename text not null, - lineno integer not null, + lineno integer not null, context text not null, created_at timestamp not null); diff --git a/schema/versions/mysql/119.sql b/schema/versions/mysql/119.sql new file mode 100644 index 000000000..ddb7d64de --- /dev/null +++ b/schema/versions/mysql/119.sql @@ -0,0 +1,7 @@ +begin; + +update ttrss_prefs set def_value = 'Automatic' where pref_name = 'USER_TIMEZONE'; + +update ttrss_version set schema_version = 119; + +commit; diff --git a/schema/versions/pgsql/119.sql b/schema/versions/pgsql/119.sql new file mode 100644 index 000000000..ddb7d64de --- /dev/null +++ b/schema/versions/pgsql/119.sql @@ -0,0 +1,7 @@ +begin; + +update ttrss_prefs set def_value = 'Automatic' where pref_name = 'USER_TIMEZONE'; + +update ttrss_version set schema_version = 119; + +commit; -- cgit v1.2.3 From 7b149552cb99a44f1fbeef642ffc60e91b1f61a0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 29 Apr 2013 15:54:23 +0400 Subject: remove language selector from the login form, store language in the database per-user --- schema/ttrss_schema_mysql.sql | 3 ++- schema/ttrss_schema_pgsql.sql | 3 ++- schema/versions/mysql/120.sql | 7 +++++++ schema/versions/pgsql/120.sql | 7 +++++++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 schema/versions/mysql/120.sql create mode 100644 schema/versions/pgsql/120.sql (limited to 'schema') diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index efa7be7cf..aa1197091 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -300,7 +300,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 (119); +insert into ttrss_version values (120); create table ttrss_enclosures (id integer primary key auto_increment, content_url text not null, @@ -397,6 +397,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('AUTO_AS 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', diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index c04e5224b..79634678d 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -258,7 +258,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (119); +insert into ttrss_version values (120); create table ttrss_enclosures (id serial not null primary key, content_url text not null, @@ -348,6 +348,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('AUTO_AS 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', diff --git a/schema/versions/mysql/120.sql b/schema/versions/mysql/120.sql new file mode 100644 index 000000000..34971146e --- /dev/null +++ b/schema/versions/mysql/120.sql @@ -0,0 +1,7 @@ +begin; + +insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_LANGUAGE', 2, '', 2); + +update ttrss_version set schema_version = 120; + +commit; diff --git a/schema/versions/pgsql/120.sql b/schema/versions/pgsql/120.sql new file mode 100644 index 000000000..34971146e --- /dev/null +++ b/schema/versions/pgsql/120.sql @@ -0,0 +1,7 @@ +begin; + +insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('USER_LANGUAGE', 2, '', 2); + +update ttrss_version set schema_version = 120; + +commit; -- cgit v1.2.3