From e93a3c96bb7baf28be14918387839d172dbb5e9b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Dec 2005 06:45:04 +0100 Subject: [PATCH] add login/pass fields for feeds --- schema/ttrss_schema_mysql.sql | 2 ++ schema/ttrss_schema_pgsql.sql | 4 +++- schema/upgrade-1.1-1.1.1-mysql.sql | 12 ++++++++++++ schema/upgrade-1.1-1.1.1-pgsql.sql | 12 ++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 142f6647..db0e1b84 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -49,6 +49,8 @@ create table ttrss_feeds (id integer not null auto_increment primary key, last_updated datetime default '', last_error text not null default '', site_url varchar(250) not null default '', + auth_login varchar(250) not null default '', + auth_pass varchar(250) not null default '', 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 cc7cac7b..1b5b8c12 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -44,7 +44,9 @@ create table ttrss_feeds (id serial not null primary key, purge_interval integer not null default 0, last_updated timestamp default null, last_error text not null default '', - site_url varchar(250) not null default ''); + site_url varchar(250) not null default '', + auth_login varchar(250) not null default '', + 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-mysql.sql b/schema/upgrade-1.1-1.1.1-mysql.sql index 4faf4fd0..cf8d7d94 100644 --- a/schema/upgrade-1.1-1.1.1-mysql.sql +++ b/schema/upgrade-1.1-1.1.1-mysql.sql @@ -17,4 +17,16 @@ 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 0; +alter table ttrss_feeds add column auth_login varchar(250); +alter table ttrss_feeds add column auth_pass varchar(250); + +update ttrss_feeds set auth_login = ''; +update ttrss_feeds set auth_pass = ''; + +alter table ttrss_feeds change auth_login auth_login varchar(250) not null; +alter table ttrss_feeds alter column auth_login set default ''; + +alter table ttrss_feeds change auth_pass auth_pass varchar(250) not null; +alter table ttrss_feeds alter column auth_pass set default ''; + commit; diff --git a/schema/upgrade-1.1-1.1.1-pgsql.sql b/schema/upgrade-1.1-1.1.1-pgsql.sql index 33b28271..110d01af 100644 --- a/schema/upgrade-1.1-1.1.1-pgsql.sql +++ b/schema/upgrade-1.1-1.1.1-pgsql.sql @@ -17,4 +17,16 @@ 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; +alter table ttrss_feeds add column auth_login varchar(250); +alter table ttrss_feeds add column auth_pass varchar(250); + +update ttrss_feeds set auth_login = ''; +update ttrss_feeds set auth_pass = ''; + +alter table ttrss_feeds alter column auth_login set not null; +alter table ttrss_feeds alter column auth_login set default ''; + +alter table ttrss_feeds alter column auth_pass set not null; +alter table ttrss_feeds alter column auth_pass set default ''; + commit; -- 2.39.5