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

update script for two factor

This commit is contained in:
Kyle Spearrin
2017-06-07 15:39:43 -04:00
parent b5fbe23be2
commit f352ec808f
3 changed files with 20 additions and 17 deletions

View File

@ -0,0 +1,20 @@
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