forked from MV10/IdentityServer4.AdoPersistence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.sql
34 lines (32 loc) · 1.41 KB
/
tables.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CREATE TABLE [dbo].[AppUser] (
[id] INT IDENTITY (1, 1) NOT NULL,
[SubjectId] NVARCHAR (MAX) NOT NULL,
[Username] NVARCHAR (MAX) NOT NULL,
[PasswordSalt] NVARCHAR (MAX) NOT NULL,
[PasswordHash] NVARCHAR (MAX) NOT NULL,
[ProviderName] NVARCHAR (MAX) NOT NULL,
[ProviderSubjectId] NVARCHAR (MAX) NOT NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);
CREATE TABLE [dbo].[Claim] (
[id] INT IDENTITY (1, 1) NOT NULL,
[AppUser_id] INT NOT NULL,
[Issuer] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
[OriginalIssuer] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
[Subject] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
[Type] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
[Value] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
[ValueType] NVARCHAR (MAX) DEFAULT ('') NOT NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);
CREATE TABLE [dbo].[Grant] (
[id] INT IDENTITY (1, 1) NOT NULL,
[Key] NVARCHAR (200) NOT NULL,
[ClientId] NVARCHAR (200) NOT NULL,
[CreationTime] DATETIME2 (7) NOT NULL,
[Data] NVARCHAR (MAX) NOT NULL,
[Expiration] DATETIME2 (7) NULL,
[SubjectId] NVARCHAR (200) NOT NULL,
[Type] NVARCHAR (50) NOT NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);