From 4d73637869e2e9d3adf4e7d9dc327a41bd071eb9 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@bah.spb.su>
Date: Mon, 13 Oct 2008 14:10:31 +0100
Subject: schema: add ttrss_counters_cache

---
 schema/ttrss_schema_pgsql.sql | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index dd419891e..9d716f235 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -13,6 +13,7 @@ drop table ttrss_entry_comments;
 drop table ttrss_user_entries;
 drop table ttrss_entries;
 drop table ttrss_scheduled_updates;
+drop table ttrss_counters_cache;
 drop table ttrss_feeds;
 drop table ttrss_feed_categories;
 drop table ttrss_users;
@@ -83,6 +84,11 @@ insert into ttrss_feeds (owner_uid, title, feed_url) values
 insert into ttrss_feeds (owner_uid, title, feed_url) values 
 	(1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.spb.ru/forum/rss.php');
 
+create table ttrss_counters_cache (
+	feed_id integer not null references ttrss_feeds(id) ON DELETE CASCADE,
+	owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
+	value integer not null default 0);
+
 create table ttrss_entries (id serial not null primary key, 
 	title text not null, 
 	guid text not null unique, 
@@ -190,7 +196,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 (43);
+insert into ttrss_version values (44);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
-- 
cgit v1.2.3

