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:
17
src/Sql/dbo/Tables/Device.sql
Normal file
17
src/Sql/dbo/Tables/Device.sql
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user