From 28bcadff2b748ac06d05be1a59af4e320d924bf6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Dec 2005 09:30:52 +0100 Subject: [PATCH] schema: add collapsed field for ttrss_user_categories --- schema/ttrss_schema_mysql.sql | 1 + schema/ttrss_schema_pgsql.sql | 1 + schema/upgrade-1.1-1.1.1-mysql.sql | 7 +++++++ schema/upgrade-1.1-1.1.1-pgsql.sql | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index ba97aac3c..142f6647b 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -34,6 +34,7 @@ insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'password create table ttrss_feed_categories(id integer not null primary key auto_increment, owner_uid integer not null, title varchar(200) not null, + collapsed bool not null default false, index(owner_uid), foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 080f990e9..cc7cac7b3 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -31,6 +31,7 @@ insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'password create table ttrss_feed_categories(id serial not null primary key, owner_uid integer not null references ttrss_users(id) on delete cascade, + collapsed boolean not null default false, title varchar(200) not null); create table ttrss_feeds (id serial not null primary key, diff --git a/schema/upgrade-1.1-1.1.1-mysql.sql b/schema/upgrade-1.1-1.1.1-mysql.sql index 1c26bd8f3..8a4e29a00 100644 --- a/schema/upgrade-1.1-1.1.1-mysql.sql +++ b/schema/upgrade-1.1-1.1.1-mysql.sql @@ -10,4 +10,11 @@ alter table ttrss_entries alter column num_comments set default 0; insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2, 'Display expanded list of feed articles, instead of separate displays for headlines and article content'); +alter table ttrss_feed_categories add column collapsed bool; + +update ttrss_feed_categories set collapsed = false; + +alter table ttrss_feed_categories change collapsed collapsed bool not null; +alter table ttrss_feed_categories alter column collapsed set default false; + commit; diff --git a/schema/upgrade-1.1-1.1.1-pgsql.sql b/schema/upgrade-1.1-1.1.1-pgsql.sql index 4645809c6..33b28271a 100644 --- a/schema/upgrade-1.1-1.1.1-pgsql.sql +++ b/schema/upgrade-1.1-1.1.1-pgsql.sql @@ -10,4 +10,11 @@ alter table ttrss_entries alter column num_comments set default 0; insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2, 'Display expanded list of feed articles, instead of separate displays for headlines and article content'); +alter table ttrss_feed_categories add column collapsed boolean; + +update ttrss_feed_categories set collapsed = false; + +alter table ttrss_feed_categories alter column collapsed set not null; +alter table ttrss_feed_categories alter column collapsed set default false; + commit;