add fields for daily email digest to ttrss_users

This commit is contained in:
Andrew Dolgov 2006-08-20 11:54:53 +01:00
parent 9933172497
commit 32be4b10c3
4 changed files with 22 additions and 4 deletions

View File

@ -33,6 +33,8 @@ create table ttrss_users (id integer primary key not null auto_increment,
access_level integer not null default 0,
theme_id integer default null,
email varchar(250) not null default '',
email_digest bool not null default false,
last_digest_sent datetime default null,
index (theme_id),
foreign key (theme_id) references ttrss_themes(id)) TYPE=InnoDB;

View File

@ -32,6 +32,8 @@ create table ttrss_users (id serial not null primary key,
last_login timestamp default null,
access_level integer not null default 0,
email varchar(250) not null default '',
email_digest boolean not null default false,
last_digest_sent timestamp default null,
theme_id integer references ttrss_themes(id) default null);
insert into ttrss_users (login,pwd_hash,access_level) values ('admin',

View File

@ -1,10 +1,17 @@
alter table ttrss_feeds add column hidden bool;
update ttrss_feeds set hidden = false;
alter table ttrss_feeds change hidden hidden bool not null;
alter table ttrss_feeds alter column hidden set default false;
alter table ttrss_users add column email_digest bool;
update ttrss_users set email_digest = false;
alter table ttrss_users change email_digest email_digest bool not null;
alter table ttrss_users alter column email_digest set default false;
alter table ttrss_users add column last_digest_sent datetime;
update ttrss_users set last_digest_sent = false;
alter table ttrss_users alter column last_digest_sent set default null;
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2);

View File

@ -1,12 +1,19 @@
begin;
alter table ttrss_feeds add column hidden boolean;
update ttrss_feeds set hidden = false;
alter table ttrss_feeds alter column hidden set not null;
alter table ttrss_feeds alter column hidden set default false;
alter table ttrss_users add column email_digest boolean;
update ttrss_users set email_digest = false;
alter table ttrss_users alter column email_digest set not null;
alter table ttrss_users alter column email_digest set default false;
alter table ttrss_users add column last_digest_sent timestamp;
update ttrss_users set last_digest_sent = NULL;
alter table ttrss_users alter column last_digest_sent set default NULL;
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2);