From 3c50da8334f5c7d09c531b14d14d26d7309ddeb0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 23 Jan 2008 09:44:50 +0100 Subject: [PATCH] schema: add ttrss_feeds.last_update_started, bump version --- functions.php | 3 +++ sanity_check.php | 2 +- schema/ttrss_schema_mysql.sql | 3 ++- schema/ttrss_schema_pgsql.sql | 3 ++- schema/versions/mysql/30.sql | 4 ++++ schema/versions/pgsql/30.sql | 4 ++++ 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 schema/versions/mysql/30.sql create mode 100644 schema/versions/pgsql/30.sql diff --git a/functions.php b/functions.php index e0eb2bb0..919cd926 100644 --- a/functions.php +++ b/functions.php @@ -478,6 +478,9 @@ return; } + db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW() + WHERE id = '$feed'"); + $auth_login = db_fetch_result($result, 0, "auth_login"); $auth_pass = db_fetch_result($result, 0, "auth_pass"); diff --git a/sanity_check.php b/sanity_check.php index 27698b7e..2dfa75a8 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,7 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 14); - define('SCHEMA_VERSION', 29); + define('SCHEMA_VERSION', 30); if (!file_exists("config.php")) { print __("Fatal Error: You forgot to copy diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index e7a8eebb..a63a4133 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -77,6 +77,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, cache_images boolean not null default false, auth_pass_encrypted boolean not null default false, last_viewed datetime default null, + last_update_started datetime default null, index(owner_uid), foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, index(cat_id), @@ -203,7 +204,7 @@ create table ttrss_tags (id integer primary key auto_increment, create table ttrss_version (schema_version int not null) TYPE=InnoDB; -insert into ttrss_version values (29); +insert into ttrss_version values (30); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index f06d6729..942183bf 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -69,6 +69,7 @@ create table ttrss_feeds (id serial not null primary key, rtl_content boolean not null default false, cache_images boolean not null default false, last_viewed timestamp default null, + last_update_started timestamp default null, auth_pass_encrypted boolean not null default false); create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid); @@ -182,7 +183,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (29); +insert into ttrss_version values (30); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/versions/mysql/30.sql b/schema/versions/mysql/30.sql new file mode 100644 index 00000000..0cff2018 --- /dev/null +++ b/schema/versions/mysql/30.sql @@ -0,0 +1,4 @@ +alter table ttrss_feeds add column last_update_started datetime; +alter table ttrss_feeds alter column last_update_started set default null; + +update ttrss_version set schema_version = 30; diff --git a/schema/versions/pgsql/30.sql b/schema/versions/pgsql/30.sql new file mode 100644 index 00000000..d83eee1f --- /dev/null +++ b/schema/versions/pgsql/30.sql @@ -0,0 +1,4 @@ +alter table ttrss_feeds add column last_update_started timestamp; +alter table ttrss_feeds alter column last_update_started set default null; + +update ttrss_version set schema_version = 30; -- 2.39.5