diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 142f6647b..db0e1b846 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 cc7cac7b3..1b5b8c123 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 4faf4fd03..cf8d7d947 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 33b28271a..110d01af0 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;