1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

remove user twofactorenabled property

This commit is contained in:
Kyle Spearrin
2017-06-19 22:25:19 -04:00
parent 3b5b24531b
commit 2eaaecd95c
9 changed files with 25 additions and 43 deletions

View File

@ -1,23 +0,0 @@
alter table [user] add [TwoFactorProviders] NVARCHAR (MAX) NULL
go
update [user]
set twofactorproviders = '{"0":{"Enabled":'+ (case when twofactorenabled = 1 then 'true' else 'false' end) +',"Remember":true,"MetaData":{"Key":"'+ authenticatorkey +'"}}}'
where twofactorprovider is not null and twofactorprovider = 0
and authenticatorkey is not null
go
alter table [user] drop column authenticatorkey
go
drop view [userview]
go
CREATE VIEW [dbo].[UserView]
AS
SELECT
*
FROM
[dbo].[User]
go

View File

@ -0,0 +1,13 @@
alter table [user] drop column twofactorenabled
go
drop view [dbo].[UserView]
go
CREATE VIEW [dbo].[UserView]
AS
SELECT
*
FROM
[dbo].[User]
GO