From 0c630ef32636378bbf8c25211da256b4d7a29069 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Jan 2009 10:33:25 +0100 Subject: [PATCH] schema: add ttrss_feedbrowser_cache (bump schema) --- sanity_check.php | 2 +- schema/ttrss_schema_mysql.sql | 5 +++++ schema/ttrss_schema_pgsql.sql | 7 ++++++- schema/versions/mysql/48.sql | 6 ++++++ schema/versions/pgsql/48.sql | 9 +++++++++ 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 schema/versions/mysql/48.sql create mode 100644 schema/versions/pgsql/48.sql diff --git a/sanity_check.php b/sanity_check.php index 5191f9c7..f0b9b63a 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,7 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 17); - define('SCHEMA_VERSION', 47); + define('SCHEMA_VERSION', 48); 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 00e52479..977e56e8 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -1,6 +1,7 @@ -- SET NAMES utf8; -- SET CHARACTER SET utf8; +drop table if exists ttrss_feedbrowser_cache; drop table if exists ttrss_version; drop table if exists ttrss_labels; drop table if exists ttrss_filters; @@ -375,4 +376,8 @@ create table ttrss_sessions (id varchar(250) unique not null primary key, index (id), index (expire)) TYPE=InnoDB; +create table ttrss_feedbrowser_cache ( + feed_url text not null, + subscribers integer not null); + commit; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 5d818208..142a70f9 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -1,3 +1,4 @@ +drop table ttrss_feedbrowser_cache; drop table ttrss_version; drop table ttrss_labels; drop table ttrss_filters; @@ -199,7 +200,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 (47); +insert into ttrss_version values (48); create table ttrss_enclosures (id serial not null primary key, content_url text not null, @@ -345,4 +346,8 @@ create index ttrss_sessions_expire_index on ttrss_sessions(expire); create function SUBSTRING_FOR_DATE(timestamp, int, int) RETURNS text AS 'SELECT SUBSTRING(CAST($1 AS text), $2, $3)' LANGUAGE 'sql'; +create table ttrss_feedbrowser_cache ( + feed_url text not null primary key, + subscribers integer not null); + commit; diff --git a/schema/versions/mysql/48.sql b/schema/versions/mysql/48.sql new file mode 100644 index 00000000..8c42f6e2 --- /dev/null +++ b/schema/versions/mysql/48.sql @@ -0,0 +1,6 @@ +create table ttrss_feedbrowser_cache ( + feed_url text not null, + subscribers integer not null); + +update ttrss_version set schema_version = 48; + diff --git a/schema/versions/pgsql/48.sql b/schema/versions/pgsql/48.sql new file mode 100644 index 00000000..e3a742ac --- /dev/null +++ b/schema/versions/pgsql/48.sql @@ -0,0 +1,9 @@ +begin; + +create table ttrss_feedbrowser_cache ( + feed_url text not null primary key, + subscribers integer not null); + +update ttrss_version set schema_version = 48; + +commit;