From 7da377ca8b4668d3e21339531b1ba5d8518b9740 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 13 Aug 2006 12:43:48 +0100 Subject: [PATCH] add hidden field to ttrss_feeds --- schema/ttrss_schema_mysql.sql | 1 + schema/ttrss_schema_pgsql.sql | 1 + schema/upgrade-1.1.7-1.2.2-mysql.sql | 7 +++++++ schema/upgrade-1.1.7-1.2.2-pgsql.sql | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 360d6257..7cc4cac0 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -62,6 +62,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, parent_feed integer default null, private bool not null default false, rtl_content bool not null default false, + hidden bool not null default false, index(owner_uid), foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, index(cat_id), diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 150cef55..47817c77 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -57,6 +57,7 @@ create table ttrss_feeds (id serial not null primary key, parent_feed integer default null references ttrss_feeds(id) on delete set null, private boolean not null default false, auth_pass varchar(250) not null default '', + hidden boolean not null default false, rtl_content boolean not null default false); create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid); diff --git a/schema/upgrade-1.1.7-1.2.2-mysql.sql b/schema/upgrade-1.1.7-1.2.2-mysql.sql index 5830742d..961bf1e2 100644 --- a/schema/upgrade-1.1.7-1.2.2-mysql.sql +++ b/schema/upgrade-1.1.7-1.2.2-mysql.sql @@ -1,3 +1,10 @@ +alter table ttrss_feeds add column hidden bool; + +update ttrss_feeds set hidden = false; + +alter table ttrss_feeds change hidden rtl_content bool not null; +alter table ttrss_feeds alter column hidden set default false; + insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); 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); diff --git a/schema/upgrade-1.1.7-1.2.2-pgsql.sql b/schema/upgrade-1.1.7-1.2.2-pgsql.sql index 6180026b..f651b6a7 100644 --- a/schema/upgrade-1.1.7-1.2.2-pgsql.sql +++ b/schema/upgrade-1.1.7-1.2.2-pgsql.sql @@ -1,5 +1,12 @@ begin; +alter table ttrss_feeds add column hidden boolean; + +update ttrss_feeds set hidden = false; + +alter table ttrss_feeds alter column hidden set not null; +alter table ttrss_feeds alter column hidden set default false; + insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); 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); -- 2.39.5