add purge_interval in ttrss_feeds (schema updated)

This commit is contained in:
Andrew Dolgov 2005-11-16 08:24:43 +01:00
parent e28f43f965
commit 1089b16bc2
3 changed files with 16 additions and 2 deletions

View file

@ -7,6 +7,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
feed_url varchar(250) unique not null, feed_url varchar(250) unique not null,
icon_url varchar(250) not null default '', icon_url varchar(250) not null default '',
update_interval integer not null default 0, update_interval integer not null default 0,
purge_interval integer not null default 0,
last_updated datetime default '', last_updated datetime default '',
last_error text not null default '', last_error text not null default '',
site_url varchar(250) not null default '') TYPE=InnoDB; site_url varchar(250) not null default '') TYPE=InnoDB;
@ -88,6 +89,6 @@ drop table ttrss_version;
create table ttrss_version (schema_version int not null) TYPE=InnoDB; create table ttrss_version (schema_version int not null) TYPE=InnoDB;
insert into ttrss_version values (1); insert into ttrss_version values (2);

View file

@ -7,6 +7,7 @@ create table ttrss_feeds (id serial not null primary key,
feed_url varchar(250) unique not null, feed_url varchar(250) unique not null,
icon_url varchar(250) not null default '', icon_url varchar(250) not null default '',
update_interval integer not null default 0, update_interval integer not null default 0,
purge_interval integer not null default 0,
last_updated timestamp default null, last_updated timestamp default null,
last_error text not null default '', last_error text not null default '',
site_url varchar(250) not null default ''); site_url varchar(250) not null default '');
@ -83,5 +84,5 @@ drop table ttrss_version;
create table ttrss_version (schema_version int not null); create table ttrss_version (schema_version int not null);
insert into ttrss_version values (1); insert into ttrss_version values (2);

View file

@ -0,0 +1,12 @@
begin;
alter table ttrss_feeds add column purge_interval integer;
update ttrss_feeds set purge_interval = 0;
alter table ttrss_feeds alter column purge_interval set not null;
alter table ttrss_feeds alter column purge_interval set default 0;
update ttrss_version set schema_version = 2;
commit;