Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table dbo.UserToken
- (
- Id int identity
- constraint UserToken_pk
- primary key,
- AccessToken nvarchar(max) not null,
- UserId int not null
- constraint UserToken_User_Id_fk
- references dbo.[User],
- Expiration bigint not null
- )
- CREATE procedure UsersToken_Update @Id int,
- @AccessToken nvarchar(255),
- @Expiration datetime
- as
- begin
- update dbo.[UserToken]
- set AccessToken = @AccessToken,
- Expiration = @Expiration
- where Id = @Id
- end;
- CREATE procedure UsersToken_Insert @AccessToken nvarchar(255),
- @UserId int,
- @Expiration datetime
- AS
- BEGIN
- INSERT INTO dbo.[UserToken] (AccessToken, UserId, Expiration)
- VALUES (@AccessToken, @UserId, @Expiration);
- END;
- go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement