From 32be4b10c33a31d0e44e2062c37bede01c994f22 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@bah.spb.su>
Date: Sun, 20 Aug 2006 11:54:53 +0100
Subject: add fields for daily email digest to ttrss_users

---
 schema/upgrade-1.1.7-1.2.2-pgsql.sql | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'schema/upgrade-1.1.7-1.2.2-pgsql.sql')

diff --git a/schema/upgrade-1.1.7-1.2.2-pgsql.sql b/schema/upgrade-1.1.7-1.2.2-pgsql.sql
index f651b6a74..b47d89bc6 100644
--- a/schema/upgrade-1.1.7-1.2.2-pgsql.sql
+++ b/schema/upgrade-1.1.7-1.2.2-pgsql.sql
@@ -1,12 +1,19 @@
 begin;
 
 alter table ttrss_feeds add column hidden boolean;
-
 update ttrss_feeds set hidden = false;
-
 alter table ttrss_feeds alter column hidden set not null;
 alter table ttrss_feeds alter column hidden set default false;
 
+alter table ttrss_users add column email_digest boolean;
+update ttrss_users set email_digest = false;
+alter table ttrss_users alter column email_digest set not null;
+alter table ttrss_users alter column email_digest set default false;
+
+alter table ttrss_users add column last_digest_sent timestamp;
+update ttrss_users set last_digest_sent = NULL;
+alter table ttrss_users alter column last_digest_sent set default NULL;
+
 insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3);
 
 insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2);
-- 
cgit v1.2.3

