From: Andrew Dolgov Date: Fri, 30 Dec 2005 03:05:01 +0000 (+0100) Subject: ttrss_feeds: add private column to hide from browser X-Git-Tag: schema_freeze_for_1.1.2~40 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5b35b4de9bb6aea6e61297bad1e4b89c0b037fcc;p=tt-rss.git ttrss_feeds: add private column to hide from browser --- diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 7d7f7151..0fdf3d5b 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -55,6 +55,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, auth_login varchar(250) not null default '', auth_pass varchar(250) not null default '', parent_feed integer default null, + private 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 5344783d..2deae606 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -50,6 +50,7 @@ create table ttrss_feeds (id serial not null primary key, 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, + private boolean not null default false, auth_pass varchar(250) not null default ''); create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid); diff --git a/schema/upgrade-1.1.1-1.1.2-mysql.sql b/schema/upgrade-1.1.1-1.1.2-mysql.sql index a889e5c1..d6c8a522 100644 --- a/schema/upgrade-1.1.1-1.1.2-mysql.sql +++ b/schema/upgrade-1.1.1-1.1.2-mysql.sql @@ -3,6 +3,13 @@ begin; alter table ttrss_feeds add column parent_feed integer; alter table ttrss_feeds add foreign key (parent_feed) references ttrss_feeds(id) on delete set null; +alter table ttrss_feeds add column private bool; + +update ttrss_feeds set private = false; + +alter table ttrss_feeds change private private bool not null; +alter table ttrss_feeds alter column private set default 0; + update ttrss_version set schema_version = 4; commit; diff --git a/schema/upgrade-1.1.1-1.1.2-pgsql.sql b/schema/upgrade-1.1.1-1.1.2-pgsql.sql index a889e5c1..960ed8b6 100644 --- a/schema/upgrade-1.1.1-1.1.2-pgsql.sql +++ b/schema/upgrade-1.1.1-1.1.2-pgsql.sql @@ -3,6 +3,13 @@ begin; alter table ttrss_feeds add column parent_feed integer; alter table ttrss_feeds add foreign key (parent_feed) references ttrss_feeds(id) on delete set null; +alter table ttrss_feeds add column private boolean; + +update ttrss_feeds set private = false; + +alter table ttrss_feeds alter column private set not null; +alter table ttrss_feeds alter column private set default false; + update ttrss_version set schema_version = 4; commit;