From b7e7c8f9501850a38705e0a1f18a8ae6e25f1be1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 9 Jan 2013 15:57:29 +0100
Subject: Added new database upgrade script, converted DDL scripts to new
 format

---
 SQL/mssql.initial.sql | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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

diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 85b8e4ef6..e312cfbcd 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -115,6 +115,12 @@ CREATE TABLE [dbo].[searches] (
 ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 GO
 
+CREATE TABLE [dbo].[system] (
+	[name] [varchar] (64) COLLATE Latin1_General_CI_AI NOT NULL ,
+	[value] [text] COLLATE Latin1_General_CI_AI NOT NULL 
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
 ALTER TABLE [dbo].[cache_index] WITH NOCHECK ADD 
 	 PRIMARY KEY CLUSTERED 
 	(
@@ -185,6 +191,13 @@ ALTER TABLE [dbo].[searches] WITH NOCHECK ADD
 	) ON [PRIMARY] 
 GO
 
+ALTER TABLE [dbo].[system] WITH NOCHECK ADD 
+	CONSTRAINT [PK_system_name] PRIMARY KEY CLUSTERED 
+	(
+		[name]
+	) ON [PRIMARY] 
+GO
+
 ALTER TABLE [dbo].[cache] ADD 
 	CONSTRAINT [DF_cache_user_id] DEFAULT ('0') FOR [user_id],
 	CONSTRAINT [DF_cache_cache_key] DEFAULT ('') FOR [cache_key],
@@ -358,3 +371,6 @@ CREATE TRIGGER [contact_delete_member] ON [dbo].[contacts]
     WHERE [contact_id] IN (SELECT [contact_id] FROM deleted)
 GO
 
+INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2013011000.sql')
+GO
+
\ No newline at end of file
-- 
cgit v1.2.3

