summaryrefslogtreecommitdiff
path: root/SQL/mssql.initial.sql
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-01-09 15:57:29 +0100
committerAleksander Machniak <alec@alec.pl>2013-01-09 15:57:29 +0100
commitb7e7c8f9501850a38705e0a1f18a8ae6e25f1be1 (patch)
tree916116f2fea4c80538c992b833959036c905a9ed /SQL/mssql.initial.sql
parent64e218bd13b948712d79b60f6eae90cf393ec81f (diff)
Added new database upgrade script, converted DDL scripts to new format
Diffstat (limited to 'SQL/mssql.initial.sql')
-rw-r--r--SQL/mssql.initial.sql16
1 files changed, 16 insertions, 0 deletions
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