1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

event fixes

This commit is contained in:
Kyle Spearrin
2017-12-12 15:04:14 -05:00
parent 5c91949f2d
commit 6649c29a8b
5 changed files with 27 additions and 17 deletions

View File

@ -7,6 +7,7 @@
@CollectionId UNIQUEIDENTIFIER,
@GroupId UNIQUEIDENTIFIER,
@OrganizationUserId UNIQUEIDENTIFIER,
@ActingUserId UNIQUEIDENTIFIER,
@Date DATETIME2(7)
AS
BEGIN
@ -22,6 +23,7 @@ BEGIN
[CollectionId],
[GroupId],
[OrganizationUserId],
[ActingUserId],
[Date]
)
VALUES
@ -34,6 +36,7 @@ BEGIN
@CollectionId,
@GroupId,
@OrganizationUserId,
@ActingUserId,
@Date
)
END

View File

@ -7,12 +7,13 @@
[CollectionId] UNIQUEIDENTIFIER NULL,
[GroupId] UNIQUEIDENTIFIER NULL,
[OrganizationUserId] UNIQUEIDENTIFIER NULL,
[ActingUserId] UNIQUEIDENTIFIER NULL,
[Date] DATETIME2 (7) NOT NULL,
CONSTRAINT [PK_Event] PRIMARY KEY CLUSTERED ([Id] ASC)
);
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_Event_Date]
ON [dbo].[Event]([Date] ASC);
CREATE NONCLUSTERED INDEX [IX_Event_DateOrganizationIdUserId]
ON [dbo].[Event]([Date] ASC, [OrganizationId] ASC, [UserId] ASC);