diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 7d7f7151e..0fdf3d5bc 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 5344783de..2deae6060 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 a889e5c1c..d6c8a522d 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 a889e5c1c..960ed8b64 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;