2021-11-13 16:04:04 +02:00
|
|
|
if not exists (select top 1 1 from sys.objects where name = 'UserToken' and type = 'U')
|
|
|
|
begin
|
|
|
|
create table UserToken
|
|
|
|
(
|
2021-11-13 17:17:13 +02:00
|
|
|
TokenId int identity(1, 1) constraint PK_Token primary key,
|
2021-11-13 16:04:04 +02:00
|
|
|
UserId int not null constraint FK_Token_AppUser foreign key references AppUser(UserId),
|
|
|
|
Token varchar(1000) not null,
|
|
|
|
ValidFrom datetime not null,
|
2021-11-13 17:17:13 +02:00
|
|
|
ValidUntil datetime not null,
|
|
|
|
Burnt bit
|
2021-11-13 16:04:04 +02:00
|
|
|
)
|
|
|
|
end
|
|
|
|
go
|