schema: add enabled field to ttrss_filters

This commit is contained in:
Andrew Dolgov 2006-08-20 15:02:48 +01:00
parent 79ec0f2f4c
commit 4fd52ba4b0
4 changed files with 12 additions and 0 deletions

View file

@ -148,6 +148,7 @@ create table ttrss_filters (id integer not null primary key auto_increment,
feed_id integer default null, feed_id integer default null,
filter_type integer not null, filter_type integer not null,
reg_exp varchar(250) not null, reg_exp varchar(250) not null,
enabled bool not null default true,
action_id integer not null default 1, action_id integer not null default 1,
index (filter_type), index (filter_type),
foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE, foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE,

View file

@ -142,6 +142,7 @@ create table ttrss_filters (id serial not null primary key,
feed_id integer references ttrss_feeds(id) on delete cascade default null, feed_id integer references ttrss_feeds(id) on delete cascade default null,
filter_type integer not null references ttrss_filter_types(id), filter_type integer not null references ttrss_filter_types(id),
reg_exp varchar(250) not null, reg_exp varchar(250) not null,
enabled boolean not null default true,
action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade); action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade);
create table ttrss_labels (id serial not null primary key, create table ttrss_labels (id serial not null primary key,

View file

@ -12,6 +12,11 @@ alter table ttrss_users add column last_digest_sent datetime;
update ttrss_users set last_digest_sent = false; update ttrss_users set last_digest_sent = false;
alter table ttrss_users alter column last_digest_sent set default null; alter table ttrss_users alter column last_digest_sent set default null;
alter table ttrss_filters add column enabled bool;
update ttrss_filters set enabled = true;
alter table ttrss_filters change enabled enabled bool not null;
alter table ttrss_filters alter column enabled set default true;
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('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); 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

@ -14,6 +14,11 @@ alter table ttrss_users add column last_digest_sent timestamp;
update ttrss_users set last_digest_sent = NULL; update ttrss_users set last_digest_sent = NULL;
alter table ttrss_users alter column last_digest_sent set default NULL; alter table ttrss_users alter column last_digest_sent set default NULL;
alter table ttrss_filters add column enabled boolean;
update ttrss_filters set enabled = true;
alter table ttrss_filters alter column enabled set not null;
alter table ttrss_filters alter column enabled set default true;
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('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); 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);