1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

collection index

This commit is contained in:
Kyle Spearrin 2018-04-24 21:27:51 -04:00
parent 528a0732a6
commit 9067ac15de
2 changed files with 17 additions and 0 deletions

View File

@ -7,4 +7,10 @@
CONSTRAINT [PK_Collection] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Collection_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id]) ON DELETE CASCADE
);
GO
CREATE NONCLUSTERED INDEX [IX_Collection_OrganizationId_IncludeAll]
ON [dbo].[Collection]([OrganizationId] ASC)
INCLUDE([CreationDate], [Name], [RevisionDate]);
GO

View File

@ -155,6 +155,17 @@ BEGIN
END
GO
IF NOT EXISTS (
SELECT * FROM sys.indexes WHERE [Name]='IX_Collection_OrganizationId_IncludeAll'
AND object_id = OBJECT_ID('[dbo].[Collection]')
)
BEGIN
CREATE NONCLUSTERED INDEX [IX_Collection_OrganizationId_IncludeAll]
ON [dbo].[Collection]([OrganizationId] ASC)
INCLUDE([CreationDate], [Name], [RevisionDate])
END
GO
IF OBJECT_ID('[dbo].[CipherDetails_ReadByTypeUserId]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[CipherDetails_ReadByTypeUserId]