1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:25:55 +00:00

archived feeds: expire old entries (schema bump)

This commit is contained in:
Andrew Dolgov
2019-03-06 19:06:05 +03:00
parent 26c226c8e4
commit 38e01270d8
9 changed files with 43 additions and 12 deletions

View File

@@ -69,6 +69,7 @@ create table ttrss_feed_categories(id integer not null primary key auto_incremen
create table ttrss_archived_feeds (id integer not null primary key,
owner_uid integer not null,
created datetime not null,
title varchar(200) not null,
feed_url text not null,
site_url varchar(250) not null default '',
@@ -285,7 +286,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_version values (135);
insert into ttrss_version values (136);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,

View File

@@ -109,6 +109,7 @@ insert into ttrss_feeds (owner_uid, title, feed_url) values
create table ttrss_archived_feeds (id integer not null primary key,
owner_uid integer not null references ttrss_users(id) on delete cascade,
created timestamp not null,
title varchar(200) not null,
feed_url text not null,
site_url varchar(250) not null default '');
@@ -267,7 +268,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
create table ttrss_version (schema_version int not null);
insert into ttrss_version values (135);
insert into ttrss_version values (136);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,

View File

@@ -0,0 +1,9 @@
begin;
alter table ttrss_archived_feeds add column created datetime;
update ttrss_version set schema_version = 136;
alter table ttrss_archived_feeds alter column created set not null;
update ttrss_archived_feeds set created = NOW();
commit;

View File

@@ -0,0 +1,9 @@
begin;
alter table ttrss_archived_feeds add column created timestamp;
update ttrss_archived_feeds set created = NOW();
alter table ttrss_archived_feeds alter column created set not null;
update ttrss_version set schema_version = 136;
commit;