summaryrefslogtreecommitdiff
path: root/SQL/mssql.initial.sql
diff options
context:
space:
mode:
Diffstat (limited to 'SQL/mssql.initial.sql')
-rw-r--r--SQL/mssql.initial.sql15
1 files changed, 2 insertions, 13 deletions
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 2ac6aa63e..85b8e4ef6 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -1,5 +1,4 @@
CREATE TABLE [dbo].[cache] (
- [cache_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] NOT NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
@@ -93,7 +92,6 @@ CREATE TABLE [dbo].[users] (
[user_id] [int] IDENTITY (1, 1) NOT NULL ,
[username] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[mail_host] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
- [alias] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[last_login] [datetime] NULL ,
[language] [varchar] (5) COLLATE Latin1_General_CI_AI NULL ,
@@ -117,13 +115,6 @@ CREATE TABLE [dbo].[searches] (
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
-ALTER TABLE [dbo].[cache] WITH NOCHECK ADD
- PRIMARY KEY CLUSTERED
- (
- [cache_id]
- ) ON [PRIMARY]
-GO
-
ALTER TABLE [dbo].[cache_index] WITH NOCHECK ADD
PRIMARY KEY CLUSTERED
(
@@ -282,6 +273,8 @@ GO
CREATE INDEX [IX_identities_user_id] ON [dbo].[identities]([user_id]) ON [PRIMARY]
GO
+CREATE INDEX [IX_identities_email] ON [dbo].[identities]([email],[del]) ON [PRIMARY]
+GO
ALTER TABLE [dbo].[session] ADD
CONSTRAINT [DF_session_sess_id] DEFAULT ('') FOR [sess_id],
@@ -295,16 +288,12 @@ GO
ALTER TABLE [dbo].[users] ADD
CONSTRAINT [DF_users_username] DEFAULT ('') FOR [username],
CONSTRAINT [DF_users_mail_host] DEFAULT ('') FOR [mail_host],
- CONSTRAINT [DF_users_alias] DEFAULT ('') FOR [alias],
CONSTRAINT [DF_users_created] DEFAULT (getdate()) FOR [created]
GO
CREATE UNIQUE INDEX [IX_users_username] ON [dbo].[users]([username],[mail_host]) ON [PRIMARY]
GO
-CREATE INDEX [IX_users_alias] ON [dbo].[users]([alias]) ON [PRIMARY]
-GO
-
CREATE UNIQUE INDEX [IX_dictionary_user_language] ON [dbo].[dictionary]([user_id],[language]) ON [PRIMARY]
GO