1
0
mirror of https://github.com/bitwarden/server synced 2026-01-18 16:33:29 +00:00

Added schema for device table

This commit is contained in:
Kyle Spearrin
2016-06-18 13:22:29 -04:00
parent 1ff49cd5b3
commit 3e32a55640
8 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE [dbo].[Device] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[Type] SMALLINT NOT NULL,
[PushToken] NVARCHAR (255) NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
CONSTRAINT [PK_Device] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Device_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
);
GO
CREATE NONCLUSTERED INDEX [IX_Device_UserId]
ON [dbo].[Device]([UserId] ASC);