From 8219df7241e3c96bb6b7f9abfa057b8a64b1839f Mon Sep 17 00:00:00 2001
From: alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Sun, 18 Sep 2011 09:02:35 +0000
Subject: - Cache synchronization using QRESYNC/CONDSTORE - Fixed message ID
 updates in cache - Changed message flags handling + some fixes (e.g. fixed
 messages listing after delete)

git-svn-id: https://svn.roundcube.net/trunk@5233 208e9e7b-5314-0410-a742-e7e81cd9613c
---
 roundcubemail/SQL/mssql.initial.sql | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

(limited to 'roundcubemail/SQL/mssql.initial.sql')

diff --git a/roundcubemail/SQL/mssql.initial.sql b/roundcubemail/SQL/mssql.initial.sql
index eb5f20bcc..b3bb1c8b8 100644
--- a/roundcubemail/SQL/mssql.initial.sql
+++ b/roundcubemail/SQL/mssql.initial.sql
@@ -11,6 +11,7 @@ CREATE TABLE [dbo].[cache_index] (
 	[user_id] [int] NOT NULL ,
 	[mailbox] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
 	[changed] [datetime] NOT NULL ,
+	[valid] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL ,
 	[data] [text] COLLATE Latin1_General_CI_AI NOT NULL 
 ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 GO
@@ -29,12 +30,7 @@ CREATE TABLE [dbo].[cache_messages] (
 	[uid] [int] NOT NULL ,
 	[changed] [datetime] NOT NULL ,
 	[data] [text] COLLATE Latin1_General_CI_AI NOT NULL 
-	[seen] [char](1) NOT NULL ,
-	[deleted] [char](1) NOT NULL ,
-	[answered] [char](1) NOT NULL ,
-	[forwarded] [char](1) NOT NULL ,
-	[flagged] [char](1) NOT NULL ,
-	[mdnsent] [char](1) NOT NULL ,
+	[flags] [int](1) NOT NULL ,
 ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 GO
 
@@ -229,12 +225,7 @@ GO
 
 ALTER TABLE [dbo].[cache_messages] ADD 
 	CONSTRAINT [DF_cache_messages_changed] DEFAULT (getdate()) FOR [changed]
-	CONSTRAINT [DF_cache_messages_seen] DEFAULT (0) FOR [seen],
-	CONSTRAINT [DF_cache_messages_deleted] DEFAULT (0) FOR [deleted],
-	CONSTRAINT [DF_cache_messages_answered] DEFAULT (0) FOR [answered],
-	CONSTRAINT [DF_cache_messages_forwarded] DEFAULT (0) FOR [forwarded],
-	CONSTRAINT [DF_cache_messages_flagged] DEFAULT (0) FOR [flagged],
-	CONSTRAINT [DF_cache_messages_mdnsent] DEFAULT (0) FOR [mdnsent],
+	CONSTRAINT [DF_cache_messages_flags] DEFAULT (0) FOR [flags],
 GO
 
 CREATE  INDEX [IX_cache_messages_user_id] ON [dbo].[cache_messages]([user_id]) ON [PRIMARY]
-- 
cgit v1.2.3

