summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-19 22:41:10 +0400
committerAndrew Dolgov <[email protected]>2013-03-19 22:41:10 +0400
commitbfd61d3f85d9b2554a016e4c2f711a1285ff8818 (patch)
treefd94cb22ce5a2df59ab540a1d8769cbf36f73282 /schema
parent2229e6ed6b07d4a28b04689a21c645bdb83652f7 (diff)
rework STRIP_IMAGES to remove embedding; add per-feed control over embedded images (bump schema)
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql5
-rw-r--r--schema/ttrss_schema_pgsql.sql5
-rw-r--r--schema/versions/mysql/106.sql12
-rw-r--r--schema/versions/pgsql/106.sql12
4 files changed, 30 insertions, 4 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index d4873ecb0..438865478 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -117,6 +117,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
hidden bool not null default false,
include_in_digest boolean not null default true,
cache_images boolean not null default false,
+ hide_images boolean not null default false,
cache_content boolean not null default false,
auth_pass_encrypted boolean not null default false,
last_viewed datetime default null,
@@ -312,7 +313,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 (105);
+insert into ttrss_version values (106);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
@@ -414,7 +415,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
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');
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Hide images in articles', 2);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Do not embed images in articles', 2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_ORDER_BY', 2, 'default', '', 1);
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 5063c4dd8..3895ccc56 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -79,6 +79,7 @@ create table ttrss_feeds (id serial not null primary key,
include_in_digest boolean not null default true,
rtl_content boolean not null default false,
cache_images boolean not null default false,
+ hide_images boolean not null default false,
cache_content boolean not null default false,
last_viewed timestamp default null,
last_update_started timestamp default null,
@@ -260,7 +261,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 (105);
+insert into ttrss_version values (106);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -354,7 +355,7 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
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');
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Hide images in articles', 2);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Do not embed images in articles', 2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_VIEW_ORDER_BY', 2, 'default', '', 1);
diff --git a/schema/versions/mysql/106.sql b/schema/versions/mysql/106.sql
new file mode 100644
index 000000000..b819416b9
--- /dev/null
+++ b/schema/versions/mysql/106.sql
@@ -0,0 +1,12 @@
+begin;
+
+update ttrss_prefs set short_desc = 'Do not embed images in articles' where pref_name = 'STRIP_IMAGES';
+
+alter table ttrss_feeds add column hide_images bool;
+update ttrss_feeds set hide_images = false;
+alter table ttrss_feeds change hide_images hide_images bool not null;
+alter table ttrss_feeds alter column hide_images set default false;
+
+update ttrss_version set schema_version = 106;
+
+commit;
diff --git a/schema/versions/pgsql/106.sql b/schema/versions/pgsql/106.sql
new file mode 100644
index 000000000..6e3dee2c9
--- /dev/null
+++ b/schema/versions/pgsql/106.sql
@@ -0,0 +1,12 @@
+begin;
+
+update ttrss_prefs set short_desc = 'Do not embed images in articles' where pref_name = 'STRIP_IMAGES';
+
+alter table ttrss_feeds add column hide_images boolean;
+update ttrss_feeds set hide_images = false;
+alter table ttrss_feeds alter column hide_images set not null;
+alter table ttrss_feeds alter column hide_images set default false;
+
+update ttrss_version set schema_version = 106;
+
+commit;